Message126208
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? |
|
Date |
User |
Action |
Args |
2011-01-13 22:10:49 | cool-RR | set | recipients:
+ cool-RR, eric.araujo, SilentGhost, docs@python |
2011-01-13 22:10:49 | cool-RR | set | messageid: <1294956649.75.0.278266927201.issue10893@psf.upfronthosting.co.za> |
2011-01-13 22:10:48 | cool-RR | link | issue10893 messages |
2011-01-13 22:10:48 | cool-RR | create | |
|