Description
socket
, the module contains socket
, the class. In the documentation, the functions of the module are rendered in exactly the same way as the methods of the class: socket.getaddrinfo
and socket.accept
look 'the same' in the documentation, even though the latter is actually socket.socket.accept
. The only clue to that is the paragraph at the beginning of the section, but when e.g. linking to a particular method, that's easy to miss, and the user is left to infer that from the method description (or realise they have to scroll up/which section they're in).
The docs consistently use module.func
for module-level functions and class.func
for the methods of module.class
. That style's fine most of the time and avoids the potential visual overload of always writing module.class.func
. Naturally, the confusion arises only because the module and class have the same name in this particular case.
I'm not sure how to best resolve this, but I feel like the current situation is certainly not ideal.