Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Nested classes and functions are not checked #13
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.
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.