This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Delgan
Recipients Delgan, docs@python
Date 2019-11-23.09:10:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574500217.1.0.37004563113.issue38900@roundup.psfhosted.org>
In-reply-to
Content
Hi.

Quick use case explanation about this: I would like to document my function, stating that it accepts any "callable" object and linking to a proper definition of such object.

For example, I'm already doing this when my function accepts a "file object". There exists no such type I can link to, so I link to the glossary definition: https://docs.python.org/3/glossary.html#term-file-object

I could link to the "callable()" built-in but than does not reflect well the expected *type* of the argument. For now, I define the argument as a "function" ( https://docs.python.org/3/glossary.html#term-function ) but this is too restrictive.

The definition for "callable" would be pretty straightforward, just mentioning it should implement "__call__", also linking to "emulating callable object" ( https://docs.python.org/3/reference/datamodel.html#emulating-callable-objects ) and / or the "callable()" builtin ( https://docs.python.org/3/library/functions.html#callable ).
History
Date User Action Args
2019-11-23 09:10:17Delgansetrecipients: + Delgan, docs@python
2019-11-23 09:10:17Delgansetmessageid: <1574500217.1.0.37004563113.issue38900@roundup.psfhosted.org>
2019-11-23 09:10:17Delganlinkissue38900 messages
2019-11-23 09:10:16Delgancreate