[Python-Dev] Re: PEP 318 bake-off? (original) (raw)
David Goodger goodger at python.org
Thu Apr 1 18:43:07 EST 2004
- Previous message: [Python-Dev] Re: PEP 318 bake-off?
- Next message: [Python-Dev] Re: PEP 318 bake-off?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phillip J. Eby wrote:
Thanks! So for example, this:
def admonition(*args): return makeadmonition(nodes.admonition, *args) admonition.arguments = (1, 0, 1) admonition.options = {'class': directives.classoption} admonition.content = 1 ... might be rephrased as (say): as [rstdirective( arguments=(1,0,1), options={'class': directives.classoption}, content=1 ) ] def admonition(*args): return makeadmonition(nodes.admonition, *args)
I suppose so, but a generic function attribute decorator would do just as well. IOW, it doesn't have to be "rst_directive", just "attributes" would do fine.
-- David Goodger
- Previous message: [Python-Dev] Re: PEP 318 bake-off?
- Next message: [Python-Dev] Re: PEP 318 bake-off?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]