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

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

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

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

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Michael Selik
On Sun, Aug 21, 2016 at 2:46 AM eryk sun wrote: > On Sun, Aug 21, 2016 at 6:34 AM, Michael Selik > wrote: > > The detection of not hashable via __hash__ set to None was necessary, but > > not desirable. Better to have never defined the

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread eryk sun
On Sun, Aug 21, 2016 at 6:34 AM, Michael Selik wrote: > The detection of not hashable via __hash__ set to None was necessary, but > not desirable. Better to have never defined the method/attribute in the > first place. Since __iter__ isn't present on ``object``, we're

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Michael Selik
On Sun, Aug 21, 2016 at 1:27 AM Chris Angelico wrote: > Hmm. It would somehow need to be recognized as "not iterable". I'm not > sure how this detection is done; is it based on the presence/absence > of __iter__, or is it by calling that method and seeing what comes > back? If

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread Nick Coghlan
On 21 August 2016 at 16:02, eryk sun wrote: > On Sun, Aug 21, 2016 at 5:27 AM, Chris Angelico wrote: >> Hmm. It would somehow need to be recognized as "not iterable". I'm not >> sure how this detection is done; is it based on the presence/absence >> of

Re: [Python-ideas] discontinue iterable strings

2016-08-21 Thread eryk sun
On Sun, Aug 21, 2016 at 5:27 AM, Chris Angelico wrote: > Hmm. It would somehow need to be recognized as "not iterable". I'm not > sure how this detection is done; is it based on the presence/absence > of __iter__, or is it by calling that method and seeing what comes > back? If