mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
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
This commit is contained in:
parent
51a85ddce8
commit
b775106d94
19 changed files with 2225 additions and 1491 deletions
|
@ -453,7 +453,7 @@ class PydocDocTest(unittest.TestCase):
|
|||
zero = 0
|
||||
one = 1
|
||||
doc = pydoc.render_doc(BinaryInteger)
|
||||
self.assertIn('<BinaryInteger.zero: 0>', doc)
|
||||
self.assertIn('BinaryInteger.zero', doc)
|
||||
|
||||
def test_mixed_case_module_names_are_lower_cased(self):
|
||||
# issue16484
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue