PEP 289: Generator Expressions (please comment)
Just
just at xs4all.nl
Sat Oct 25 10:04:51 EDT 2003
In article <871xt1qvwb.fsf at pobox.com>, jjl at pobox.com (John J. Lee)
wrote:
> "Emile van Sebille" <emile at fenx.com> writes:
> [...]
> > What do you get from:
> > type(x*x for x in roots)
> [...]
>
> <type 'function'>?
<type 'generator'> actually:
>>> def foo(): yield 1
...
>>> type(foo)
<type 'function'>
>>> type(foo())
<type 'generator'>
>>>
Just
More information about the Python-list
mailing list