Python slang
Chris Angelico
rosuav at gmail.com
Sat Aug 6 15:29:34 EDT 2016
On Sun, Aug 7, 2016 at 5:17 AM, Marco Sulla <marcosullaroma at gmail.com> wrote:
>
> Nope, I was thinking that "map()" should be a method of an iterable.
> But this is another topic :)
The problem with that is that it has to become a method of _every_
iterable type, which means it becomes part of the protocol of
iterables. Much easier to make it a built-in function, which can then
accept any iterable based only on the __iter__ method.
ChrisA
More information about the Python-list
mailing list