On Dec 10, 2010, at 12:56 PM, Antoine Pitrou wrote: > On Fri, 10 Dec 2010 12:27:26 -0800 > Raymond Hettinger <raymond.hettinger at gmail.com> wrote: >> >> IMO, sysconfig did not warrant a whole module. > > Where would you put it? A single function in the sys module. > >> Rather than using two levels of dictionary, it's also possible >> to use a named tuple if you think that is more clean looking: >> >>>>> c = sys.sysconfig() >>>>> c.config_vars.get('SO) >> '.pyd' > > Some of these things are computed at runtime by parsing makefiles and > other stuff. You don't want to do it as soon as the module is imported. The proposal is for a function that does the computation when invoked, not when imported. The function returns a named tuple so that we can use Python's builtin accessors like attributes and dict.get(). Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4