This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, brett.cannon, docs@python, eric.smith
Date 2013-04-01.21:55:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20130401175523.703e6657@anarchist>
In-reply-to <1364850275.51.0.701069525497.issue17566@psf.upfronthosting.co.za>
Content
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. :)
History
Date User Action Args
2013-04-01 21:55:25barrysetrecipients: + barry, brett.cannon, eric.smith, docs@python
2013-04-01 21:55:25barrylinkissue17566 messages
2013-04-01 21:55:25barrycreate