This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Gerrit.Holl, docs@python, iritkatriel, martin.panter, slateny, terry.reedy
Date 2022-03-01.19:10:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"IOBase" is a public name and IOBase has an __init__ method.  It definitely has a public constructor.  However, like other abstract base classes, it is not meant to be directly instantiated by users other than writers of other classes.  Ditto for the 3 other io ABCs.  Because this is generic to all ABCs, it need not be repeated for each.

The proposed replacement is the opposite of the truth.  Rather than accepting no arguments, IOBase, like the ABCs in numbers and, has a generic signature and accepts any arguments (which I believe are ignored).

>>> io.IOBase.__init__.__text_signature__
'($self, /, *args, **kwargs)'
>>> io.IOBase(3, a=5)
<io.IOBase object at 0x000001CF6A13D6C0>

A class, such as `object`, accepting no arguments other that self raises.  (At one time, object had the generic signature above.)

>>> object(3)
Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
TypeError: object() takes no arguments

I think that the fix should be to delete the original incorrect statement and not replace it with another incorrect statement.

Most abstract base classes are in and numbers.  They are not specifically labelled 'abstract base class' in their docstrings because they are in modules consisting more or less entirely of ABCs.  Since io is mostly a module of concrete classes, I think it appropriate to specifically label them, as they are now.  Once so labeled, nothing need be added that is true of all ABCs.
Date User Action Args
2022-03-01 19:10:26terry.reedysetrecipients: + terry.reedy, docs@python, Gerrit.Holl, martin.panter, iritkatriel, slateny
2022-03-01 19:10:26terry.reedysetmessageid: <>
2022-03-01 19:10:26terry.reedylinkissue25415 messages
2022-03-01 19:10:26terry.reedycreate