From: Python-ideas 
[mailto:python-ideas-bounces+tritium-list=sdamon....@python.org] On Behalf Of 
?????
Sent: Saturday, August 20, 2016 5:56 PM
To: python-ideas <python-ideas@python.org>
Subject: Re: [Python-ideas] discontinue iterable strings

On Sun, Aug 21, 2016 at 12:28 AM Alexander Heger <mailto:pyt...@2sn.net> wrote:
Did I leave anything out?
How would you weigh the benefits against the problems?
How would you manage the upgrade path for code that's been broken?

FIrst one needs to add the extension string attributes like split()/split(''), 
chars(), and substring[] (Python 3.7).  

When indexing becomes disallowed (Python 3.10 / 4.0) attempts to iterate (or 
slice) will raise TypeError.  The fixes overall will be a lot easier and 
obvious than introduction of unicode as default string type in Python 3.0.  It 
could already be used/test starting with Python 3.7 using 'from future import 
__monolythic_strings__`.

 Is there any equivalent __future__ import with such deep semantic 
implications? Most imports I can think of are mainly syntactic.
And what would it do? change the type of string literals? change the behavior 
of str methods locally in this module? globally? How will this play with 3rd 
party libraries?
Sounds like it will break stuff in a way that cannot be locally fixed.

~Elazar


from __future__ import unicode_literals outright changes the type of object 
string literals make (in python 2).  If you were to create a non-iterable, 
non-sequence text type (a horrible idea, IMO) the same thing can be done done  
for that.

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to