A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-February/032871.html below:

native code compiler? (or, OCaml vs. Python)

[Python-Dev] Re: native code compiler? (or, OCaml vs. Python) [Python-Dev] Re: native code compiler? (or, OCaml vs. Python)holger krekel pyth@devel.trillke.net
Mon, 3 Feb 2003 23:20:51 +0100
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