Github user nchammas commented on a diff in the pull request:
https://github.com/apache/spark/pull/5173#discussion_r27773735
--- Diff: python/pyspark/sql/functions.py ---
@@ -116,7 +114,7 @@ def __init__(self, func, returnType):
def _create_judf(self):
f = self.func # put it in closure `func`
- func = lambda _, it: imap(lambda x: f(*x), it)
+ func = lambda _, it: map(lambda x: f(*x), it)
--- End diff --
A common approach I've seen in projects wanting to support both Python 2
and 3 is to use the [`six`](https://pythonhosted.org/six/) compatibility
module, which has [support for renamed
methods](https://pythonhosted.org/six/#module-six.moves).
```
from six.moves import map
```
We probably don't want to add another external dependency, but just thought
I'd throw that out there.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]