Possible PEP: Improve classmethod/staticmethod syntax

sismex01 at hebmex.com sismex01 at hebmex.com
Fri Jun 6 09:58:06 EDT 2003


> From: Duncan Booth [mailto:duncan at NOSPAMrcp.co.uk]
> Sent: Friday, June 06, 2003 4:46 AM
> 
> "Sean Ross" <sross at connectmail.carleton.ca> wrote in 
> news:9HRDa.4706$IR1.570080 at news20.bellglobal.com:
> 
> > # version with sugar
> > def foo() as static,
> >                      synchronized,
> >                      contract(pre,post):
> >         ...do stuff...
> 
> I don't think this quite works as stated.
> Python lets you break a line inside a parenthesised 
> expression or with a continuation character, so it
> seems to me that this proposal would require one of
> the following:
> 
> def foo() as (static,
>               synchronized,
>               contract(pre,post)):
>     pass
> 
> or:
> 
> def foo() as static, \
>              synchronized, \
>              contract(pre,post):
>     pass
>

since it's a tuple, any of the forms is valid.

Has anyone patched the compiler source to do this yet?
Seems like a minor change to the grammar, but I don't have
the source onhand, nor can I download it. :-(

-gca

--
Advertencia:La informacion contenida en este mensaje es confidencial y
restringida, por lo tanto esta destinada unicamente para el uso de la
persona arriba indicada, se le notifica que esta prohibida la difusion de
este mensaje. Si ha recibido este mensaje por error, o si hay problemas en
la transmision, favor de comunicarse con el remitente. Gracias.





More information about the Python-list mailing list