can't import generators

Dave Reed dreed at capital.edu
Sat Jun 29 16:49:17 EDT 2002


> From: aahz at pythoncraft.com (Aahz)
> Newsgroups: comp.lang.python
> Organization: The Cat & Dragon
> Xref: news.baymountain.net comp.lang.python:170335
> Sender: python-list-admin at python.org
> Date: 29 Jun 2002 16:33:50 -0400
> 
> In article <m2hejlc060.fsf at mother.paradise.lost>,
> John Hunter  <jdhunter at nitace.bsd.uchicago.edu> wrote:
> >
> >I am having trouble working with generators.  Anyone know what might
> >cause this behavior:
> >
> >Python 2.2.1 (#1, Apr 22 2002, 21:20:54) 
> >[GCC 3.0.4] on linux2
> >Type "help", "copyright", "credits" or "license" for more information.
> >>>> from __future__ import generators
> >Traceback (most recent call last):
> >  File "<stdin>", line 1, in ?
> >ImportError: cannot import name generators
> 
> Can't do this in interactive mode.  Use a script.


Works for me:

Python 2.2.1 (#1, May  7 2002, 17:07:14) 
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import generators
>>> 

This is a Red Hat 7.3 system with 2.2.1 compiled by me from the .tgz
file.

Dave





More information about the Python-list mailing list