what is meaning of "@" in pyhon program.
Joel Corbin
zaikenv at gmail.com
Fri Jun 27 10:55:02 EDT 2008
Hi Evan,
The @ is a "decorator", knowing this should help you search for a better
explanation than I could give...
Have a look here to start:
http://mail.python.org/pipermail/tutor/2006-September/048978.html
Joel
On Fri, Jun 27, 2008 at 10:48 AM, Evan <xdicry at gmail.com> wrote:
> HI,
>
> When I check example of "cmd2" module (a enhancement of cmd module), I
> can not understand all, for example: the character "@",
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++
> def options(option_list):
> ..........<function content>........
>
> class cmd(...):
> ...............................
> @options([make_option('-p', '--piglatin', action="store_true",
> help="atinLay")])
> +++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> I do not understand what "@options" does, most time, I know what the
> meaning of character "*" and character "**", but I was not use "@"
> before.
>
> Thanks for your help.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080627/298faed6/attachment-0001.html>
More information about the Python-list
mailing list