Re: Raw string statement (proposal)

2018-05-27 Thread Dan Stromberg
On Thu, May 24, 2018 at 9:34 PM, Mikhail V wrote: > Hi. > I've put some thoughts together, and > need some feedback on this proposal. > Main question is: Is it convincing? > Is there any flaw? > My own opinion - there IS something to chase. > Still the justification for such syntax is hard. > Th

Re: Raw string statement (proposal)

2018-05-26 Thread Mikhail V
On Sat, May 26, 2018 at 10:21 PM, Chris Angelico wrote: > > I'm done. Argue with brick walls for the rest of eternity if you like. I see you like me, but I can reciprocate your feelings. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/

Re: Raw string statement (proposal)

2018-05-26 Thread Chris Angelico
On Sun, May 27, 2018 at 5:13 AM, Mikhail V wrote: > On Sat, May 26, 2018 at 7:10 PM, Steven D'Aprano >> temp = >>| Mikhail's syntax for {65290} is {65290} >> Can you see the problem yet? How does your collapse function f() >> distinguish between the escape code {65290} and the literal string

Re: Raw string statement (proposal)

2018-05-26 Thread Mikhail V
On Sat, May 26, 2018 at 7:10 PM, Steven D'Aprano wrote: > On Sat, 26 May 2018 18:22:15 +0300, Mikhail V wrote: > >>> Here is a string assigned to name `s` using Python's current syntax: >>> >>> s = "some\ncharacters\0abc\x01\ndef\uFF0A\nhere" >>> >>> How do you represent that assignment using your

Re: Raw string statement (proposal)

2018-05-26 Thread Steven D'Aprano
On Sat, 26 May 2018 18:22:15 +0300, Mikhail V wrote: >> Here is a string assigned to name `s` using Python's current syntax: >> >> s = "some\ncharacters\0abc\x01\ndef\uFF0A\nhere" >> >> How do you represent that assignment using your syntax? > > Hope its not mandatory to decipher your random exam

Re: Raw string statement (proposal)

2018-05-26 Thread Mikhail V
On Sat, May 26, 2018 at 10:55 AM, Steven D'Aprano wrote: > On Sat, 26 May 2018 08:09:51 +0300, Mikhail V wrote: > >> On Fri, May 25, 2018 at 1:15 PM, bartc wrote: > [...] >>> One problem here is how to deal with embedded non-printable characters: >>> CR, LF and TAB might become part of the normal

Re: Raw string statement (proposal)

2018-05-26 Thread Steven D'Aprano
On Sat, 26 May 2018 08:09:51 +0300, Mikhail V wrote: > On Fri, May 25, 2018 at 1:15 PM, bartc wrote: [...] >> One problem here is how to deal with embedded non-printable characters: >> CR, LF and TAB might become part of the normal source text, but how >> about anything else? Or would you only al

Re: Raw string statement (proposal)

2018-05-25 Thread Mikhail V
On Fri, May 25, 2018 at 1:15 PM, bartc wrote: > On 25/05/2018 05:34, Mikhail V wrote: > > I had one big problem with your proposal, which is that I couldn't make head > or tail of your syntax. Such a thing should be immediately obvious. > > (In your first two examples, what IS the exact string th

Re: Raw string statement (proposal)

2018-05-25 Thread bartc
On 25/05/2018 05:34, Mikhail V wrote: Proposal --- Current proposal suggests adding syntax for the "raw text" statement. This should enable the possibility to define text pieces in source code without the need for interpreted characters. Thereby it should solve the mentioned issues. Add