You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very convenient because I can easily debug and test scripts, as well as run the same script unchanged in different installations.
However, the semantics of map is different. While in multiprocessing a generator is accepted, in IPython is not (fails when it tries to take the length of the generator). Insider multiprocessing, the following code converts a generator to a list:
if not hasattr(iterable, '__len__'):
iterable = list(iterable)
I do not really like this behavior (Explicit is better than implicit), but having the same semantics is convenient.
So, my questions are:
1.- Is it possible to have a map that does not require to know in advance the number of tasks?
2.- If not, what do you think about using the same semantics that multiprocessing?
The text was updated successfully, but these errors were encountered:
I have a script that is executed using either
This is very convenient because I can easily debug and test scripts, as well as run the same script unchanged in different installations.
However, the semantics of map is different. While in multiprocessing a generator is accepted, in IPython is not (fails when it tries to take the length of the generator). Insider multiprocessing, the following code converts a generator to a list:
I do not really like this behavior (
Explicit is better than implicit
), but having the same semantics is convenient.So, my questions are:
1.- Is it possible to have a
map
that does not require to know in advance the number of tasks?2.- If not, what do you think about using the same semantics that
multiprocessing
?The text was updated successfully, but these errors were encountered: