Issue 34612: doc Some classes are treated as functions in Built-in Functions (original) (raw)

Created on 2018-09-08 22:29 by adelfino, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9119 closed adelfino,2018-09-08 22:31
Messages (5)
msg324864 - (view) Author: Andrés Delfino (adelfino) * (Python triager) Date: 2018-09-08 22:29
Beyond other classes documented as functions (classmethod, enumerate, filter, map, reversed, staticmethod, super and zip), the following issues exist: * memoryview, range, and tuple are marked as functions * complex and object treat themselves as functions in their descriptions Attached PR fixes this.
msg324866 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-09-08 23:11
I'm not sure this is an improvement. While it's true that 'complex' is a class, it's described here as a function. Same as 'int'. The fact that it's a function or class isn't so important here. I suspect it will confuse people to have something described as a class in the section titled 'Built-in Functions'. We wouldn't want to change the section to the more correct 'Built-in Callables'.
msg324867 - (view) Author: Andrés Delfino (adelfino) * (Python triager) Date: 2018-09-08 23:39
Please note that several classes are marked as such (e.g., int, float, str, dict, list) and bool for example treats itself as a class in it's description. Perhaps your concerns applies to all those ocurrences too?
msg324868 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-09-08 23:46
Ah, you're correct. I just looked for the word "class" inside the "int" text, and it doesn't appear there: I thought it was deliberately left out. But it does show up in the sub-section header (before "int" itself). Sorry about that. The text changes look good, then. I don't know enough about Sphinx to know how changing the meta-data affects things.
msg324869 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2018-09-09 00:35
I concur with Eric. These were marked as functions in the function section of the docs. Their role as classes is noted in the body. And their role as complete classes with a listing of their methods is documented elsewhere.
History
Date User Action Args
2022-04-11 14:59:05 admin set github: 78793
2018-09-09 00:35:04 rhettinger set status: open -> closednosy: + rhettingermessages: + resolution: rejectedstage: patch review -> resolved
2018-09-08 23:46:09 eric.smith set messages: +
2018-09-08 23:39:51 adelfino set messages: +
2018-09-08 23:11:13 eric.smith set nosy: + eric.smithmessages: +
2018-09-08 22:31:30 adelfino set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest8572>
2018-09-08 22:29:55 adelfino create