Message83613
> 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. |
|
Date |
User |
Action |
Args |
2009-03-15 00:47:43 | jdwhitley | set | recipients:
+ jdwhitley, georg.brandl, rhettinger, k0wax, steven.daprano |
2009-03-15 00:47:43 | jdwhitley | set | messageid: <1237078063.62.0.312910289916.issue1714448@psf.upfronthosting.co.za> |
2009-03-15 00:47:42 | jdwhitley | link | issue1714448 messages |
2009-03-15 00:47:41 | jdwhitley | create | |
|