How to avoid "()" when writing a decorator accepting optional arguments?

zeekay zachkelling at gmail.com
Thu Jun 16 07:10:03 EDT 2011


I wrote a little library that does this a couple weeks ago, it's on
pypi: http://pypi.python.org/pypi/Decorum/. It's pretty simple, the
last example illustrates how to do what you want. After thinking about
it though, I think it's probably not a great idea to allow the
parenthesis to be omitted.



More information about the Python-list mailing list