Stefan Behnel added the comment:

> Also, PEP 8 forbids using annotations in the CPython library, which
> includes all of CPython's builtins.  So using annotations in any way
> for this was off the table.

Interesting, wasn't aware of that. Then let's wait what will happen when
users start manually adding signature information to the docstrings of
their C code extensions and come asking for annotation support in order to
allow for introspection of the expected parameter types.

> You imply that __text_signature__ is improper and unsafe.

What I'm saying is that the existing function introspection API would have
provided a much better way to do these things, and that it's good to
finally have the meta data available in the source code so that that API
can be made available at some point. Sorry if my wording sounded offensive.

> If in the future we need to change how we represent signatures, we can
> remove it.  It's an undocumented internal implementation detail and we
> have free license to do so.

I don't think that's possible any more once it's out in the wild. The
feature is just way too visible.

----------

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

Reply via email to