gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH 3/4] Fixes gps.gps.gps iterator for Python 3.


From: Fred Wright
Subject: Re: [gpsd-dev] [PATCH 3/4] Fixes gps.gps.gps iterator for Python 3.
Date: Sat, 16 Apr 2016 12:38:58 -0700 (PDT)

On Sat, 16 Apr 2016, Eric S. Raymond wrote:

> Fred Wright <address@hidden>:
> > Python 3 renames the iterator next() method to __next__().  Without
> > the new name, attempting to use the object as an iterator doesn't
> > work.  This didn't surface until trying webgps.py.
>
> Sounds like this should be acced to Practical Python Porting.  Does
> 2to3 do the method renaming?

Yes, it looks like it does.  I never bothered running 2to3 on gps/*.py
since I assumed you'd already done that in your initial pass, and just
fixed things that actually failed.

Of course running 2to3 *now*, it wants to rename the wrapper, which would
make it completely broken.  It should really be called 2to3only, since it
complains about anything you try to do for Python 2 compatibility. :-)

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]