If I check a file containing
I notice that it will not complain that B does not contain any PyDoc. I guess this is incorrect behaviour?
This was intended by me, but nothing like that is mentioned in PEP257 itself.
For me a nested class (also nested function) is automatically something private, i.e. it is not necessary to document it, like a function that starts with an underscore.
Still not sure how pep257 should behave in this case, and in case of nested functions.
The reason I filed the bug is that I tend to put class specific exceptions/errors nested in another class is they are only thrown by that class. Maybe doing it that way is not the Pythonic way of doing it, I don't know...
If nested stuff is private, then start its name with '_*' . I also use nested functions, a lot ... ex Twisted code.
My two cents on this issue:
Nested classes are public. They are public because names defined inside a class definitions are accessible from outside of the class, such as methods, class methods, class members, etc. For all of these, we consider them public unless they are prepended with an underscore.
Nested function are private. They are private because names inside a function definitions are not accessible from the outside, namely local variables.
Just to make it clear - in "nested class" I meant a class inside a class, not a class inside a function.