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:47:41
SpamBayes Score 2.3656426e-09
Marked as misclassified No
Message-id <1237078063.62.0.312910289916.issue1714448@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.

You are correct. It does assign the result of the bool. I have
made an error in creating the example. This is what happens when
I copy and paste and don't check the result.

should read

 if f -> name:
   # use name, (pointless example but in line with the OP's suggestion)

Thanks for picking this up.
History
Date User Action Args
2009-03-15 00:47:43jdwhitleysetrecipients: + jdwhitley, georg.brandl, rhettinger, k0wax, steven.daprano
2009-03-15 00:47:43jdwhitleysetmessageid: <1237078063.62.0.312910289916.issue1714448@psf.upfronthosting.co.za>
2009-03-15 00:47:42jdwhitleylinkissue1714448 messages
2009-03-15 00:47:41jdwhitleycreate