iamtrask / DEPRECATED

DEPRECATED - do not use!!!
Apache License 2.0
349 stars 48 forks source link

Organize class methods and functions #69

Closed tblazina closed 6 years ago

tblazina commented 6 years ago

Currently there is no order of how methods appear, for example, within the TensorBase class and in math.py. There is no strict convention for organizing methods and functions but a general pattern to follow would be:

class SomeClass(object):
    def __magic_methods__(self):
        "magic methods first, usually in alphabetical order"
    def _private_method(self):
        "worker methods next, also in alphabetical order"
    def a_method(self):
        "then normal methods, also in alphabetical order"`            
tblazina commented 6 years ago

annnd... i'll take this one