Paul McGuire <[EMAIL PROTECTED]> wrote:

> The Enable/Disable decorators on the Python wiki (http://
> wiki.python.org/moin/PythonDecoratorLibrary?highlight=%28decorator
> %29#head-8298dbf9ac7325d9ef15e7130e676378bbbda572) help you do
> something very similar, without having to replicate the function being
> enabled/disabled.
> 
> @(disabled,enabled)[Print_Info]
> def printOrNot(arg):
>     print arg
> 

Pardon me for asking, but isn't that a syntax error? Decorator syntax is:

    "@" dotted_name ["(" [argument_list [","]] ")"] NEWLINE

and you don't have a dotted_name.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to