[Python-ideas] Module aliases and/or "real names"
ncoghlan at gmail.com
Thu Jan 6 02:52:54 CET 2011
On Thu, Jan 6, 2011 at 3:45 AM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> On 5 January 2011 15:57, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> The two examples I looked at (functools and datetime) favoured hiding
>> the implementation details at the cost of causing introspection
>> problems. Despite my comments in the opening post of the thread, I
>> think that is the better trade-off to make.
> Both of those are because of underlying C implementations where
> introspection problems would be the default anyway, which isn't quite the
> same for situation for unittest.
True, but it means the precedent of using __module__ to refer to the
official location rather than than the actual location has already
been set. That suggests to me our best way forward is to bless that as
a recommended practice, then find a way to deal with the negative
impact it currently has on introspection (such as a "__real_module__"
attribute, as I suggested in another post).
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas