I want to order methods in a Python class but I don\'t know what is the correct order.
When I extract methods in Eclipse with PyDev, Eclipse puts the extracted metho
I do something similar to @Ethan that I saw in Django's source, where the main difference is big "############" block comments to delimit the areas. For example,
class SomeClass(object):
#################
# Magic Methods #
#################
def __magic_methods__(self):
"magic methods first"
##################
# Public Methods #
##################
def a_method(self):
"then normal methods, in order of importance"
###################
# Private Methods #
###################
def _private_method(self):
"then worker methods, grouped by importance or related function"
Obviously this is less useful for smaller classes.