Message253117
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.) |
|
Date |
User |
Action |
Args |
2015-10-17 03:37:21 | terry.reedy | set | recipients:
+ terry.reedy, docs@python, Gerrit.Holl, martin.panter |
2015-10-17 03:37:21 | terry.reedy | set | messageid: <1445053041.13.0.828117082873.issue25415@psf.upfronthosting.co.za> |
2015-10-17 03:37:21 | terry.reedy | link | issue25415 messages |
2015-10-17 03:37:20 | terry.reedy | create | |
|