Module/package hierarchy and its separation from file structure
Carl Banks
pavlovevidence at gmail.com
Wed Jan 30 12:02:52 EST 2008
On Jan 30, 4:31 am, Peter Schuller <peter.schul... at infidyne.com>
wrote:
> I don't know Python internals enough to state of believe with any
> authority wither, let's say, stomping __module__ and hacking
> sys.modules would be enough to *truly* do it correctly in a proper way
> such that it is entirely transparent. This is why I care about whether
> it truly changes the real identity of the class; it's not about
> satisfying my particular list of examples (because they *were* just
> examples).
Well, all I will say is that many people on this list, myself
included, do know Python internals, and we use the method we've been
suggesting here, without problems.
I think you're slipping to a level of paranoia that's more harmful
that helpful now.
The ironic thing is, breaking the one-to-one module-to-file
relationship is more likely to have "unintended consequences", by a
very large margin. Python has always been one-to-one module-to-file
(excepting modules built into the interpretter), and many codes and
tools have come to depend on it.
Carl Banks
More information about the Python-list
mailing list