if <assignment>:

André Næss andre.hates.spam at ifi.uio.no
Mon Nov 25 11:18:38 EST 2002


sismex01 at hebmex.com wrote:

>> From: André Næss [mailto:andre.hates.spam at ifi.uio.no]
>> Sent: Sunday, November 24, 2002 8:00 AM
>> 
>> When I started learning Python one of the things that
>> surprised me was that you couldn't do assignments inside
>> the if clause, e.g.:
>> 
>> if myvar = someFunction():
>>
> 
> Why does it surprise you?
> 
> Most all languages, except those of C descent, don't
> have if <assignment>.

Well then you're probably not surprised that my background is in C, Java, 
and PHP, hence my surprise. :)

André Næss



More information about the Python-list mailing list