things I wish python could do
Ville Vainio
ville at spammers.com
Thu May 13 15:21:25 EDT 2004
>>>>> "Terry" == Terry Reedy <tjreedy at udel.edu> writes:
Terry> Would you really prefer writing <target> = expression as
Terry> set('<target>', expression) or as the 'special-form'
Terry> pseudofunction call setq(<target>, expression)? Just about
Terry> all Python statements are statements because they would
Terry> also be a PITA, and possibly more so, as expressions.
Couldn't a = 10 still be an expression despite the syntax? Or at least
behave like one, i.e. yield a result, probably 10 or None...
These days I do think it's not that big a deal, though. Putting
assignment into the condition part of while is a habit people will
outgrow, and other statements would be very clumsy as expressions.
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list