Newbee Question

sentientholon sentientholon at gmail.com
Tue Aug 21 19:03:39 CEST 2007


On Aug 21, 11:52 am, "hd1... at yahoo.com" <hd1... at yahoo.com> wrote:
> I tryed your code and got an error message #I use Wing IDE:
> Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)]
> Type "help", "copyright", "credits" or "license" for more information.
>
> Evaluating lines 1-16 from truckStops.py
> <string>:7: Warning: 'yield' will become a reserved keyword in the
> future
> Could not execute because an error occurred:
>   invalid syntax: <string>, line 7, pos 19:
>           yield stops, wage

Python 2.2.3 is three versions behind.  Generators only work in 2.2 by
saying:

from __future__ import generators

And by default in anything from 2.3 on.

Fred




More information about the Python-list mailing list