Guido van Rossum wrote: > > > (We could make random.__dict__ read-only, like the new-style class > > > __dict__, if you worry about other ways of stuffing unexpected > > > variables inside it. > > > > do you mean specifically random.__dict__ or any modules dict? > > Any module's dict. > > > If the latter there would be quite some breakage. It is at least > > used for monkey patching modules to make them "unittestable" which > > is a valid use case IMO. > > Why would this be done by patching the module's __dict__ rather than > assigning to attributes of the module? I shortcircuited that with a module's readonly __dict__ you couldn't do a setattr on the module anymore. Which is not neccessarily so. thanks, holger
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