[Michael Gilfix] > It would be nice if python offered a facility for sharing pooled data: > maybe a global configuration object? That way it's more explicit. > It could also remove some redundant code that I tend to put in many > applications. > import config > my_opt = config.get_opt ('mymodule') > # Set a new global opt > config.set_opt ('attrib') = blah > Maybe even provide some hooks for populating the config object. I already use `config' (that precise identifier) a lot in my things, so please do not even _think_ using it for something else! :-) :-) For small projects, such a thing might be overkill. For big projects, there are a few (maybe many) avenues and ways how to achieve this sharing, and I'm glad having the freedom of installing subtle nuances between projects, as needed. That is, I would fear a bit being pulled in an arbitrary direction: it would have to be convincingly damned good. :-) Better, maybe, would be to merely document some of the possible avenues. Most of these require only a tiny investment in lines of code anyway. -- François Pinard http://www.iro.umontreal.ca/~pinard
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