On Thu, Jan 6, 2011 at 3:45 AM, Michael Foord email@example.com wrote:
On 5 January 2011 15:57, Nick Coghlan firstname.lastname@example.org 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).