Skip to content

Conversation

@theengineear
Copy link
Contributor

In python 2, you typically get list objects. For efficiency (AFAIK) in
python 3 you’ll get a generator. Note that you can’t iterate through
a generator more than once though!

In python 2, you typically get `list` objects. For efficiency (AFAIK) in
python 3 you’ll get a generator. Note that you can’t iterate through
a generator more than once though!
@theengineear
Copy link
Contributor Author

theengineear commented May 10, 2016

@Kully you had a spent generator. This is a tricky issue between Python 2 and Python 3--good we have tests ;)

The problem is that when a generator is iterated over to completion, you typically can't iterate over it again. Many of the functions in Python 2 return lists whereas these same functions return generators in Python 3.

Hope this helps! Feel free to merge it in if you'd like. It's setup to be merged into your branch. It will just add one commit to your PR.

@Kully Kully merged commit 4237742 into Trisurf_Plots May 10, 2016
@theengineear
Copy link
Contributor Author

@Kully, as a heads up, please delete branches you've merged after your finished with them (i.e., after you've merged them). Otherwise they'll stick around in https://github.com/plotly/plotly.py/branches forever 😸

image

@Kully Kully deleted the fix-empty-generator-in-py3-trisurf branch May 10, 2016 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants