[Python-ideas] discontinue iterable strings
אלעזר
elazarg at gmail.com
Sat Aug 20 17:56:29 EDT 2016
On Sun, Aug 21, 2016 at 12:28 AM Alexander Heger <python at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160820/fd7ec202/attachment.html>
More information about the Python-ideas
mailing list