function attributes (ANN: Introducing PLY-1.0 (Python Lex-Yacc))
David Beazley
beazley at cs.uchicago.edu
Wed Jun 20 10:02:58 EDT 2001
M.-A. Lemburg writes:
> >
> > A fine idea, but the implementation is completely useless because
> > there is no syntactically convenient way to attach the
> > attributes.
>
> Ah... so that's what you're after: convenience !
> That, of course, is true.
Yep.
> So the conclusion should be: how can we make function attribute
> assignment more convienent and not why not to use them :-)
I'd definitely consider using them if they were syntactically
convenient to use. However, I'm mostly at a loss as to how you
would actually go about doing that. I suppose you could
have something like this:
def p_expr_plus(t):
.gram = 'expr : expr PLUS expr'
...
However, I'm not sure how the community would react such syntax.
Cheers,
Dave
More information about the Python-list
mailing list