Steven D'Aprano <st...@pearwood.info> added the comment:

Regarding the proposed syntax:

if (f() == 'spam') -> name:
   newname = name.replace('p', 'h') 

Surely that should assign the *bool* result of comparing f() 
with 'spam' to name? Doing anything else is opening the door to a 
world of pain.

if (f() == 'spam') -> name  # binds name=f()
if ('spam' == f()) -> name  # binds 'spam' to name?
if (f() == g()) -> name  # binds what to name?
if (f() or g()) -> name  # binds what to name?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1714448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to