Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Random832
On Sun, Aug 21, 2016, at 02:53, Michael Selik wrote: > For that to make sense, Iterable should be a parent of C, or C should > be a subclass of something registered as an Iterable. Otherwise it'd > be creating a general recommendation to say ``__iter__ = None`` on > every non-Iterable class, which

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread eryk sun
On Sun, Aug 21, 2016 at 6:53 AM, Michael Selik wrote: > For that to make sense, Iterable should be a parent of C, or C should be a > subclass of something registered as an Iterable. Otherwise it'd be creating > a general recommendation to say ``__iter__ = None`` on every non-Iterable > class, whic

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Franklin? Lee
On Aug 21, 2016 1:23 AM, "Nick Coghlan" wrote: > Now, if we were designing a language from scratch today, there's a > strong case to be made that the *right* way to represent text is to > have a stream-like interface (e.g. StringIO, BytesIO) around an atomic > type (e.g. CodePoint, int). But we're

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-21 Thread Franklin? Lee
On Aug 20, 2016 1:32 PM, "Eric V. Smith" wrote: > > On 8/19/2016 2:57 PM, Guido van Rossum wrote: >> >> I don't think we should take action now. >> >> Would it make sense, as a precaution, to declare the PEP provisional for >> one release? Then we can develop a sense of whether the current approac

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread tritium-list
That would require strings to also not be sequences, or to totally drop the sequence protocol. These are non-starters. They *will not* happen. Not they shouldn’t happen, or they probably won’t happen. They cannot and will not happen. That is a much bigger break than they were even willin

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-21 Thread Chris Angelico
On Sun, Aug 21, 2016 at 5:51 PM, Franklin? Lee wrote: > Speaking of which, how is this parsed? > f"{'\n'}" > If escape-handling is done first, the expression is a string literal holding > an actual newline character (normally illegal), rather than an escape > sequence which resolves to a n

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread tritium-list
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 Subject: Re: [Python-ideas] discontinue iterable strings On Sun, Aug 21, 2016 at 12:28 AM Alexander Heger wro

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Sven R. Kunze
On 21.08.2016 04:52, Steven D'Aprano wrote: Saying that these so-called "fixes" (we haven't established yet that Python's string behaviour is a bug that need fixing) will be easier and more obvious than the change to Unicode is not that bold a claim. Agreed. Especially those "we need to disting

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Chris Angelico
On Sun, Aug 21, 2016 at 6:08 PM, wrote: > > 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. > I