diff options
| author | Ethan Furman <ethan@stoneleaf.us> | 2021-03-30 21:17:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-30 21:17:26 -0700 |
| commit | b775106d940e3d77c8af7967545bb9a5b7b162df (patch) | |
| tree | a5146740d7fab61a70bf410e4f348a9525cb1fd4 /Lib/inspect.py | |
| parent | 51a85ddce8b336addcb61b96f04c9c5edef07296 (diff) | |
| download | cpython-git-b775106d940e3d77c8af7967545bb9a5b7b162df.tar.gz | |
bpo-40066: Enum: modify `repr()` and `str()` (GH-22392)
* Enum: streamline repr() and str(); improve docs
- repr() is now ``enum_class.member_name``
- stdlib global enums are ``module_name.member_name``
- str() is now ``member_name``
- add HOW-TO section for ``Enum``
- change main documentation to be an API reference
Diffstat (limited to 'Lib/inspect.py')
| -rw-r--r-- | Lib/inspect.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 1f2cdebd89..d6d2ce6461 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -2455,9 +2455,6 @@ class _ParameterKind(enum.IntEnum): KEYWORD_ONLY = 3 VAR_KEYWORD = 4 - def __str__(self): - return self._name_ - @property def description(self): return _PARAM_NAME_MAPPING[self] |
