Question: Or is everything a method?

Since everything is an object, a 

```
def whatever:

```

is just a method of that file.py, right?

Answer: 
Unlike in Java in Python a file named `file.py` does not necessarily contain a class called `file` as you might expect if this was a java file named `file.java`.

In Python a file is a module which is really just a namespace (more comparable to a Java package than a Java class) and not a class. Consider the example `file.py` below:

```
def whatever_func():
    print "What ever function"

class SomeClass(object):
    def whatever_meth(self):
        print "What ever method"

```

In the example above the `file` module/namespace contains an ordinary function named `whatever_func` and a class `SomeClass` which has a method `whatever_meth`.
Hmm... You can work with "whatever" as an ordinary function in file namespace.