[Python-ideas] Left arrow and right arrow operators

Chris Angelico rosuav at gmail.com
Fri Mar 8 15:07:45 EST 2019


On Sat, Mar 9, 2019 at 7:05 AM francismb <francismb at email.de> wrote:
>
> Hi Oleg,
>
> On 3/3/19 4:06 PM, Oleg Broytman wrote:
> >    You cannot create operator ``<-`` because it's currently valid
> > syntax:
> >
> >     3 <- 2
> >
> > is equivalent to
> >
> >     3 < -2
>
> Yes, its a good point, but for me it's not the same '<-' and '< -' due
> (n)blanks in between. It is may be how now it is, but means that it
> needs to be always like this? Isn't Python not already
> blank(s)/indentation aware? or it's just a grammar NO GO?
>

Python permits "3<-2", so this is indeed a no-go. You can easily test
this at the interactive interpreter.

ChrisA


More information about the Python-ideas mailing list