ENH: make Series work with map objects the same way as generators by mcsalgado · Pull Request #8909 · pandas-dev/pandas (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a reasonable argument, but I don't think this is the way python works in general.

python doesn't throw exceptions for things like these. I mean, you don't need to wrap sets with list(some_set) or iter(some_set) in most cases. python just uses the "order" it gets from iterating the set.

I think zip is a bit similar to Series, and it works fine if you just use sets with it.

and it's not just a way to conform with python idioms, I think a reasonable amount of code in the constructors could be simplified if you just ask these objects to be iterable.