[Python-ideas] Module aliases and/or "real names"
Jim Jewett
jimjjewett at gmail.com
Wed Jan 5 06:58:32 CET 2011
On Tue, Jan 4, 2011 at 5:52 PM, Guido van Rossum <guido at python.org> wrote:
> Would it be sufficient if the __module__ attribute of classes and
> functions got set to the "canonical" name rather than the "physical"
> name?
Not unless it were documented as an acceptable practice supported by
the introspection libraries, with examples pointing to stdlib usage in
places like elementTree.
Even then it may not work out, but that is the rest of the thread; I
just wanted to emphasize that this is a case where "yup, it works"
isn't good enough, because of confusion over specification vs
implementation vs accidentally worked this time.
-jJ
More information about the Python-ideas
mailing list