Idea about Idea about method parameters

Steve Holden sholden at holdenweb.com
Thu Sep 27 02:02:16 EDT 2001


"Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
news:3BB28066.EA1A08A1 at cosc.canterbury.ac.nz...
> Toby Dickenson wrote:
> >
> > class A:
> >     def __init__(self, value1, value2, value3):
> >         self.value1,self.value2,self.value3 = value1,value2,value3
>
> Ooh! Ooh! Ooh! What if you could say
>
>   self.(a, b, c) = a, b, c
>
Then you would have managed to sneak into Python a subset of the "with"
functionality most people seem to feel we can do without! Can't, offhand,
think of any reason why it shouldn't lex, though. When else would a
parenthesis be preceded by a dot? ...

regards
 Steve
--
http://www.holdenweb.com/







More information about the Python-list mailing list