mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-97959: Fix rendering of routines in pydoc (GH-113941) (GH-115296)
* Class methods no longer have "method of builtins.type instance" note.
* Corresponding notes are now added for class and unbound methods.
* Method and function aliases now have references to the module or the
class where the origin was defined if it differs from the current.
* Bound methods are now listed in the static methods section.
* Methods of builtin classes are now supported as well as methods of
Python classes.
(cherry picked from commit 2939ad02be
)
This commit is contained in:
parent
d8346d6c06
commit
cfb79caaab
5 changed files with 322 additions and 52 deletions
|
@ -4752,22 +4752,22 @@ class Color(enum.Enum)
|
|||
| The value of the Enum member.
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Methods inherited from enum.EnumType:
|
||||
| Static methods inherited from enum.EnumType:
|
||||
|
|
||||
| __contains__(value) from enum.EnumType
|
||||
| __contains__(value)
|
||||
| Return True if `value` is in `cls`.
|
||||
|
|
||||
| `value` is in `cls` if:
|
||||
| 1) `value` is a member of `cls`, or
|
||||
| 2) `value` is the value of one of the `cls`'s members.
|
||||
|
|
||||
| __getitem__(name) from enum.EnumType
|
||||
| __getitem__(name)
|
||||
| Return the member matching `name`.
|
||||
|
|
||||
| __iter__() from enum.EnumType
|
||||
| __iter__()
|
||||
| Return members in definition order.
|
||||
|
|
||||
| __len__() from enum.EnumType
|
||||
| __len__()
|
||||
| Return the number of members (no aliases)
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue