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 that start with '_' are private by convention 
unless documented otherwise.  Special names (__x__) are private in the sense 
that they are not usually used except by methods of the class; special methods 
are usually accessed by syntax or public names.  For class C, the default 
constructor is C.__new__, accessed by calling C.  (Let us not worry about other 
methods here.)  If C is a public name, with no '_', as is 'IOBase', then to me 
it has/is a public constructor.  Like other classes, IOBase has .__new__ and 
calling it produces an instance, as Gerrit discovered.  In that sense, it is 
not truly abstract.

I believe 'has no public constructor' is intended to mean 'has no documented 
signature and should not be *directly* called."  (If subclasses do call the 
base, then the signature should be documented.)

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25415>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to