Thanks to visit codestin.com
Credit goes to github.com

Skip to content

__text_signature__ in custom code #93865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
qwenger opened this issue Jun 15, 2022 · 2 comments
Closed

__text_signature__ in custom code #93865

qwenger opened this issue Jun 15, 2022 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@qwenger
Copy link

qwenger commented Jun 15, 2022

How official is __text_signature__?

  • It is not described in the docs, only succinctly mentioned twice in the changelogs.
  • The expected format of the docstring for a useful __text_signature__ to be generated is not documented.
  • In particular, the docstring format described in PEP7 for PyDoc_STR(VAR) does not seem compatible with __text_signature__.

So: are custom C extensions expected to provide docstrings compatible with __text_signature__, and if so, what is the correct format?

@encukou
Copy link
Member

encukou commented Jan 25, 2024

IMO, it's an internal implementation detail -- a way to get the information from a C structure to inspect.
It doesn't need to stay that way, but it would need to be clarified and documented. And possibly improved in the process.

There is a related question at https://discuss.python.org/t/43914 -- and discuss.python.org is a better place for questions than this bug tracker.
Please continue any discussion there, so it's seen by the proper people :)

@encukou encukou closed this as completed Jan 25, 2024
@Muhammadamjadm

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

4 participants