Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

> But what's the use case of making somedict.__getitem__(x) fast? One should 
> just write somedict[x] instead.

Using them in itertools functions. somedict.__getitem__ is faster that lambda: 
somedict[x].

As for map() and filter(), comprehensions are almost as fast as map() and 
filter() with somedict.__getitem__ and are more readable.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34396>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to