2

Informal python poll:

Do you put your __init__ functions at the top or bottom of your classes?

AKA:

class myClass:
def mymethod(self, arg):
pass
def __init__(self):
pass

or...

class myClass:
def __init__(self):
pass
def mymethod(self, arg):
pass

Comments
  • 0
    I put it in the middle because I'm a bad ass.

    At the top, truthfully
  • 0
  • 0
    Top, Python or otherwise.
  • 2
    Yup, top in any language. It's almost always the first thing I write for a class as much as anything else. And in general it's the first method called in the lifetime of an object, mattress sense to me that it would be first in the source.
  • 0
    init first
Add Comment