Question: I have a class that needs auxiliary functions, e.g. one to calculate a checksum that just uses the passed in arguments and not any properties of the class. This function is only called by the class's methods. So I dont need to pass in the 'self' as the first formal of the function.

How should I implement these functions? Can I have non-method functions in a class? Should I define them outside the class (even though they are not used by anything else)? Or is it ok for them to be regular methods?

Answer: 
Just do a nested function:

```
class Foo(object):
    def bar(self, arg):
        def inner(arg):
            print 'Yo Adrian imma in inner with {}!'.format(arg)

        inner(arg)    

Foo().bar('argument')      

```

Or just ignore the `self`:

```
class Foo(object):

    def prive(_, arg):
        print 'In prive with {}!'.format(arg)

    def bar(self, arg):
        def inner(arg):
            print 'Yo Adrian imma in inner with {}!'.format(arg)

        inner(arg)   
        self.prive(arg)

    def foo(self,arg):
        self.prive(arg)     

Foo().bar('argument')
Foo().foo('another argument') 

```

Second example prints:

```
Yo Adrian imma in inner with argument!   
In prive with argument!
In prive with another argument!

```
tldr define a function outside the class

```
class myclass():
    def __init__(self):
        myfunc()

def myfunc():
    print('f')

myclass() # prints f

```

from best to worst:

1. define outside the class
2. use staticmethod decorator
3. define a method, but ignore self

the disadvantage of 2 & 3 is that the "function" is still a method as it can applied to an object the regular way: self.myfunc()