[Python-Dev] Re: native code compiler? (or, OCaml vs. Python) (original) (raw)
holger krekel pyth@devel.trillke.net
Mon, 3 Feb 2003 23:20:51 +0100
- Previous message: [Python-Dev] Re: native code compiler? (or, OCaml vs. Python)
- Next message: [Python-Dev] Re: native code compiler? (or, OCaml vs. Python)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Re: native code compiler? (or, OCaml vs. Python)
- Next message: [Python-Dev] Re: native code compiler? (or, OCaml vs. Python)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]