Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74e6495

Browse files
committed
Fixes #13270: obsolete reference to old-style/new-style classes.
1 parent 6187664 commit 74e6495

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Doc/library/argparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ how the command-line arguments should be handled. The supported actions are:
703703
>>> parser.add_argument('--str', dest='types', action='append_const', const=str)
704704
>>> parser.add_argument('--int', dest='types', action='append_const', const=int)
705705
>>> parser.parse_args('--str --int'.split())
706-
Namespace(types=[<type 'str'>, <type 'int'>])
706+
Namespace(types=[<class 'str'>, <class 'int'>])
707707

708708
* ``'version'`` - This expects a ``version=`` keyword argument in the
709709
:meth:`~ArgumentParser.add_argument` call, and prints version information

Doc/library/stdtypes.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,8 +2785,6 @@ types, where they are relevant. Some of these are not reported by the
27852785
The name of the class or type.
27862786

27872787

2788-
The following attributes are only supported by :term:`new-style class`\ es.
2789-
27902788
.. attribute:: class.__mro__
27912789

27922790
This attribute is a tuple of classes that are considered when looking for
@@ -2802,12 +2800,12 @@ The following attributes are only supported by :term:`new-style class`\ es.
28022800

28032801
.. method:: class.__subclasses__
28042802

2805-
Each new-style class keeps a list of weak references to its immediate
2806-
subclasses. This method returns a list of all those references still alive.
2803+
Each class keeps a list of weak references to its immediate subclasses. This
2804+
method returns a list of all those references still alive.
28072805
Example::
28082806

28092807
>>> int.__subclasses__()
2810-
[<type 'bool'>]
2808+
[<class 'bool'>]
28112809

28122810

28132811
.. rubric:: Footnotes

0 commit comments

Comments
 (0)