Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7734
| From | zeekay <zachkelling@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: How to avoid "()" when writing a decorator accepting optional arguments? |
| Date | 2011-06-16 04:10 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <3ed49034-ca45-46d6-b2ac-461de5c93d0b@22g2000prx.googlegroups.com> (permalink) |
| References | <mailman.133.1307820426.11593.python-list@python.org> |
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
How to avoid "()" when writing a decorator accepting optional arguments? Giampaolo RodolĂ <g.rodola@gmail.com> - 2011-06-11 21:27 +0200 Re: How to avoid "()" when writing a decorator accepting optional arguments? zeekay <zachkelling@gmail.com> - 2011-06-16 04:10 -0700
csiph-web