PEP 308: I liked the original proposal better
Jp Calderone
exarkun at intarweb.us
Mon Feb 17 11:57:22 EST 2003
On Mon, Feb 17, 2003 at 09:08:24AM -0500, Mel Wilson wrote:
> [snip]
>
> Hmm.. well then.. arithmetic expressions haven't run left-to-right
> since the days of FORTRAN:
>
> a + b * c + d
>
> has to run inside-out, and with the Python extensions
>
> 'oh' * 4 + 3 * 'my'
>
> will die a horrible death unless it's run outside-in
>
You don't understand (intentionally or un-).
>>> def function(argument):
... print 'rar, ', argument, ' is evaluated!'
... return argument
>>> function('oh') * function(4) + function(3) * function('my')
rar, oh is evaluated!
rar, 4 is evaluated!
rar, 3 is evaluated!
rar, my is evaluated!
See?
Jp
--
#!/bin/bash
( LIST=(~/.netscape/sigs/*.sig)
cat ${LIST[$(($RANDOM % ${#LIST[*]}))]}
echo --$'\n' `uptime` ) > ~/.netscape/.signature
--
up 8 days, 20:28, 2 users, load average: 0.12, 0.13, 0.09
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030217/35b298f3/attachment.sig>
More information about the Python-list
mailing list