Barry A. Warsaw added the comment:

On Apr 01, 2013, at 09:04 PM, Brett Cannon wrote:

>If Eric doesn't have anything to add then I would like to change
>importlib.abc.Loader.module_repr() to no longer be abstract and the default
>to be defined as ``return repr(module)``. Else it should be entirely optional
>and not have a default implementation, but having it be required as abstract
>doesn't seem quite right to me.

I have no problem making it non-abstract, but I don't think you need to define
a default.  The built-in module object already does the right thing by
default.  Maybe that's why we (mistakenly?) made it abstract.  We might have
hoped to document the API but not provide a default implementation, since if
module_repr() is not both defined and callable, moduleobject.c already does
the right thing.

But at least there are unit tests so it should be hard for you to break
things. :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17566>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to