Message185775
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. :) |
|
Date |
User |
Action |
Args |
2013-04-01 21:55:25 | barry | set | recipients:
+ barry, brett.cannon, eric.smith, docs@python |
2013-04-01 21:55:25 | barry | link | issue17566 messages |
2013-04-01 21:55:25 | barry | create | |
|