This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jdwhitley
Recipients georg.brandl, jdwhitley, k0wax, rhettinger, steven.daprano
Date 2009-03-15.00:42:48
SpamBayes Score 1.905756e-06
Marked as misclassified No
Message-id <1237077772.33.0.836178281489.issue1714448@psf.upfronthosting.co.za>
In-reply-to
Content
> If we allow this, how many of the following will be allowed?

> if expr as name: <block>
> while expr as name: <block>
> expr as name  # alternative to "name = expr"

This patch implements your final point:
 expr as name (albeit with a nominal '->' RARROW rather than 'as')

the patch creates a new expression, assexp (assignment expression) 
there is no need to implement this for countless other 
if/while/for because
they accept expressions and this assignment is an expression.
(Note it is a patch for a different behaviour than the OP suggested.)


> As for using "->", please no, there are plenty of languages that use 
> line noise, but Python doesn't need to be one of them.

I have begun a discussion about this on python-ideas to give it some
air as suggested by Raymond. We can always close the issue as 'wont fix'
if it doesn't get off the ground. 

This issue (although addressing an old concern dating back 
to the beginning of python) has been sitting unloved for 9 or so months
and I felt that we should at least resolve it.

Cheers, 

Jervis
History
Date User Action Args
2009-03-15 00:42:53jdwhitleysetrecipients: + jdwhitley, georg.brandl, rhettinger, k0wax, steven.daprano
2009-03-15 00:42:52jdwhitleysetmessageid: <1237077772.33.0.836178281489.issue1714448@psf.upfronthosting.co.za>
2009-03-15 00:42:50jdwhitleylinkissue1714448 messages
2009-03-15 00:42:48jdwhitleycreate