Getting lazy with decorators
Josh English
Joshua.R.English at gmail.com
Wed Jun 27 19:09:51 EDT 2012
On Monday, June 25, 2012 11:57:39 PM UTC-7, Peter Otten wrote:
> >
> > There is nothing in the documentation (that I have found) that points to
> > this solution.
>
> That's because I "invented" it.
>
Oh bother. The lines I completely overlooked were in your __getattr__ override.
Boy is my face red.
On further experimentation, adding a do_xxx command without the decorator still works...ish. The undecorated do_xxx is still considered to have a help function, and it prints the raw docstring (instead of using the show_help method to clean it up).
Josh
More information about the Python-list
mailing list