Message339453
> 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. |
|
Date |
User |
Action |
Args |
2019-04-04 16:13:40 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, scoder, benjamin.peterson, jdemeyer, bup |
2019-04-04 16:13:40 | serhiy.storchaka | set | messageid: <1554394420.72.0.350413588079.issue34396@roundup.psfhosted.org> |
2019-04-04 16:13:40 | serhiy.storchaka | link | issue34396 messages |
2019-04-04 16:13:40 | serhiy.storchaka | create | |
|