Steven D'Aprano <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue1714448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com