[Python-Dev] Re: PEP 318 bake-off? (original) (raw)

Guido van Rossum guido at python.org
Thu Apr 1 18:47:29 EST 2004


> 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 "rstdirective", just "attributes" would do fine.

I like rst_directive(), because it's more specific -- it would catch mistakes earlier. E.g. if you misspelled argumnets, attributes() would have no clue about it; but rst_directive() should have specific keywords.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list