[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'
Petr Viktorin
report at bugs.python.org
Wed May 2 11:00:41 EDT 2018
Petr Viktorin <encukou at gmail.com> added the comment:
An option would be to use a colon to separate the module(s) from the attribute(s). The "inspect" module CLI does this, for example:
https://docs.python.org/3/library/inspect.html#command-line-interface
$ python3 -m inspect urllib.parse:SplitResult.geturl
def geturl(self):
return urlunsplit(self)
A colon can't appear in an identifier, so the old way can be used if there's no colon in the argument, making this backwards compatible.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32414>
_______________________________________
More information about the Python-bugs-list
mailing list