For review: PEP 308 - If-then-else expression
Jp Calderone
exarkun at intarweb.us
Sun Feb 9 18:45:36 EST 2003
On Sun, Feb 09, 2003 at 11:44:12AM +0100, Fredrik Lundh wrote:
> Christian Tismer wrote:
>
> > Could you do the same statistics over the usage of switch
> > statements, semicolons, {} braces, and of course MACROS ?
>
> except for the switch/case statement (which is spelled if/elif in
> Python), doesn't Python already have all that?
>
> def MACRO(a, b): #{
> return (a) + (b);
> #}
>
> print MACRO(1, 2);
>
def MACRO(a): #{
return (a) + (a);
#}
def f():
print 'Foo'
return 3
print MACRO(f())
Jp
--
up 1 day, 4:28, 2 users, load average: 0.40, 0.36, 0.25
-------------- 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/20030209/fe558558/attachment.sig>
More information about the Python-list
mailing list