[issue25415] I can create instances of io.IOBase

2015-10-31 Thread Martin Panter
Martin Panter added the comment: If existing subclasses like FileIO call the base, that is an implementation detail. But custom subclasses of the Raw, Buffered, and Text base classes should not be prohibited from chain calling the base’s __init__() method, nor should they have to override __in

[issue25415] I can create instances of io.IOBase

2015-10-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Martin, I agree with changing the doc. Gerrit misunderstood because 'no public constructors' is either meaningless or wrong. We do not usually talk about public versus private constructors. This sounds more like C++ than Python. For Python namespaces, names

[issue25415] I can create instances of io.IOBase

2015-10-15 Thread Gerrit Holl
Gerrit Holl added the comment: When the documentation says there is no public constructor, I expected it would be impossible to create instances, as in: TypeError: cannot create 'builtin_function_or_method' instances Perhaps I misunderstand the documentation. -- _

[issue25415] I can create instances of io.IOBase

2015-10-15 Thread Martin Panter
Martin Panter added the comment: “No public constructor” to me means that it is not defined how or if you can construct instances other than by the public subclasses. What do you expect to happen? How do you expect the public subclasses such as FileIO and BufferedReader to work if the base con

[issue25415] I can create instances of io.IOBase

2015-10-15 Thread Gerrit Holl
New submission from Gerrit Holl: According to the [documentation](https://docs.python.org/3/library/io.html#io.IOBase), `io.IOBase` has no public constructors. Yet I can create objects from it: $ python3.5 Python 3.5.0 (default, Sep 13 2015, 17:20:05) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]