This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, bup, jdemeyer, rhettinger, scoder, serhiy.storchaka
Date 2019-04-04.16:13:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554394420.72.0.350413588079.issue34396@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-04-04 16:13:40serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, scoder, benjamin.peterson, jdemeyer, bup
2019-04-04 16:13:40serhiy.storchakasetmessageid: <1554394420.72.0.350413588079.issue34396@roundup.psfhosted.org>
2019-04-04 16:13:40serhiy.storchakalinkissue34396 messages
2019-04-04 16:13:40serhiy.storchakacreate