Roundup Robot added the comment:
New changeset 3f9a81297b39 by Yury Selivanov in branch 'default':
inspect.signature: Improve repr of Signature and Parameter. Closes #20378
http://hg.python.org/cpython/rev/3f9a81297b39
--
nosy: +python-dev
resolution: - fixed
stage: test needed -
Ram Rachum added the comment:
If you'd like to expand this issue's scope to all the objects related to
Signature, I think that'll be good. All objects need good introspection strings.
--
___
Python tracker rep...@bugs.python.org
Yury Selivanov added the comment:
Ram, yes, I agree. Something like 'Signature f: alpha, beta=3, *args,
**kwargs' should work.
--
assignee: - yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20378
Changes by Ram Rachum r...@rachum.com:
--
components: Library (Lib)
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Implement `Signature.__repr__`
versions: Python 3.5
___
Python tracker rep...@bugs.python.org
New submission from Terry J. Reedy:
Signature.__repr__ already exits. It is inherited from object. So you must be
proposing to override the inherited method. For what purpose? With what outcome?
Without reading the signature PEP, I believe the current difference between str
and repr is
Ram Rachum added the comment:
My impression is that the `__repr__` method of any object is intended to
describe that object, hopefully in a succinct way, possibly in a REPL-friendly
way (like `list.__repr__` for example) but if not then at least
human-friendly. This is for easy