[Tutor] Generator next()

Keith Winston keithwins at gmail.com
Mon Dec 30 04:21:06 CET 2013


This is all really quite awesome, though I'm sure it'll be a while before
these are really available tools for me. I think I get(a bit more than) the
basic concept. Thanks!

> is a short-cut for this:
>
> def spam(n):
>     return "spam"*n
>
> spam = decorator(spam)
>
>
> This may be a lot to digest in one sitting. Factory functions,
> decorators, closures, they're all fantastically useful and powerful
> features of Python, but they can be a bit tricky for people to wrap
> their brains around.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131229/c8139c95/attachment.html>


More information about the Tutor mailing list