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 cool-RR
Recipients SilentGhost, cool-RR, docs@python, eric.araujo
Date 2011-01-13.22:10:48
SpamBayes Score 2.6090241e-15
Marked as misclassified No
Message-id <1294956649.75.0.278266927201.issue10893@psf.upfronthosting.co.za>
In-reply-to
Content
So if int is officially a class, why not start doing :class:`int` instead of :func:`int`?

"they’re marked up as functions, so you should treat them as functions."

Here, I've treated staticmethod as a function:

    >>> assert isinstance(staticmethod, types.FunctionType)
    Traceback (most recent call last):
      File "<pyshell#1>", line 1, in <module>
        assert isinstance(staticmethod, types.FunctionType)
    AssertionError

I get an error.

So I understand that you are using Sphinx's :func: role in a liberal way; You consider it okay to use it to mark anything that is callable, regardless of whether it's a function or a class. Am I right?

This looks to me like an abuse of Sphinx notation. When I read documentation I don't want to be second-guessing the author's intentions. If someone writes :func:`whatever` I expect `whatever` to be a function and not a class.

Perhaps we need a :callable: role?
History
Date User Action Args
2011-01-13 22:10:49cool-RRsetrecipients: + cool-RR, eric.araujo, SilentGhost, docs@python
2011-01-13 22:10:49cool-RRsetmessageid: <1294956649.75.0.278266927201.issue10893@psf.upfronthosting.co.za>
2011-01-13 22:10:48cool-RRlinkissue10893 messages
2011-01-13 22:10:48cool-RRcreate