Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backwards iterable-ness #351

Open
pomalley opened this issue Feb 7, 2018 · 2 comments
Open

backwards iterable-ness #351

pomalley opened this issue Feb 7, 2018 · 2 comments

Comments

@pomalley
Copy link
Contributor

pomalley commented Feb 7, 2018

import collections
isinstance([1,2,3]*ns, collections.Iterable)  # False
isinstance(1*ns, collections.Iterable)  # True

This seems backwards.

@zchen088
Copy link
Contributor

zchen088 commented Feb 7, 2018

Interestingly...

In [16]: np.iterable(1*ns)
Out[16]: 0

In [17]: np.iterable([1, 2, 3]*ns)
Out[17]: 1

@ejeffrey
Copy link
Contributor

ejeffrey commented Feb 8, 2018 via email

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

No branches or pull requests

3 participants