marcin-osowski / igc_lib

A simple library to parse IGC logs and extract thermals.
MIT License
50 stars 20 forks source link

itertools.zip_longest issue #49

Closed Martenz closed 5 years ago

Martenz commented 5 years ago

Got this error:

File "igc_lib_demo.py", line 13, in print_flight_details zipped = itertools.zip_longest(flight.thermals, flight.glides)

and fixed editing it with:

File "igc_lib_demo.py", line 13, in print_flight_details zipped = itertools.izip_longest(flight.thermals, flight.glides)

not sure is the correct way?!

I'm testing your code on a Cloud9 VM with Ubuntu 14 and Python 2.7.6.

thanks,

Martino.

marcin-osowski commented 5 years ago

Hey, yeah, this is a Python 2 vs Python 3 problem. It's izip_longest in Python 2 and zip_longest in Python 3.

I've changed to regular for i=0..len-1 loops: 060abd5f806e75d36b0c0b0b88ff215ab801341c

Should work fine now, thanks for reporting!