pre-PEP: Suite-Based Keywords
Robert Brewer
fumanchu at amor.org
Mon Apr 18 17:06:08 EDT 2005
Reinhold Birkenfeld wrote:
> >y = (f(11, 22, x=1, y='y for f') *
> > g(*args_from_somewhere,
> > x='x for g', y='y for g',
> > foo=lambda: return 'foo for g'))
> >
> >would be my current way to express this. But still, the less lines,
> >the less confusing it is.
And Ron Adam replied:
> I would probably do it this way.
>
> y = f(11, 22, x=1, y='y for f') \
> * g( *args_from_somewhere,
> x='x for g',
> y='y for g',
> foo=lambda: return 'foo for g' )
Which are both prettier, until you actually try to use them:
>>> g( *args_from_somewhere, x='x for g', y='y for g', foo=lambda:
return 'foo for g' )
Traceback ( File "<interactive input>", line 1
g( *args_from_somewhere, x='x for g', y='y for g', foo=lambda:
return 'foo for g' )
^
SyntaxError: invalid syntax
Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org
More information about the Python-list
mailing list