You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we do not order methods in any particular way, which hinders readability. Could we decide on an order and add it to the wiki?
There doesn't seem to be a PEP suggestion, but I guess most common ordering is: magic methods, public methods, private methods? And then alphabetically within them? I'm not sure what would be best
The text was updated successfully, but these errors were encountered:
Hm. I am familiar with ordering methods according to private, protected, public in C++ but it's not something I've ever even thought about in Python.
Personally, I prefer the methods to "build up" in the sense that you start with the constructor (__init__), then have some foundational data structures/properties and getters, and then move on to more complicated methods that interact with other ones. (I realise there are probably parts of the codes where this isn't enforced - I've never really tried to). In any case, it would be impossible to automate with a tool (unless it was an AI!).
Currently we do not order methods in any particular way, which hinders readability. Could we decide on an order and add it to the wiki?
There doesn't seem to be a PEP suggestion, but I guess most common ordering is: magic methods, public methods, private methods? And then alphabetically within them? I'm not sure what would be best
The text was updated successfully, but these errors were encountered: