Page MenuHomePhabricator

return a set with Site.languages()
Closed, ResolvedPublicFeature

Description

Feature summary:
Site.languages() returns a list currently. Return a set instead or implement an alternate property giving a set instead.

Benefits (why should this be implemented?):

Site.languages() is used several times in conjunction with in statements. Using a set with the in operator the time will be up to 300 times faster.

Event Timeline

Change #1094477 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Add a new Site property codes

https://gerrit.wikimedia.org/r/1094477

Change #1094477 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Add a new Site property codes

https://gerrit.wikimedia.org/r/1094477