find it in python doc
good!
modules in the same package can be imported without the long package prefixes!
import echo or from echo import echofilter.
important!
Everything is an attribute, one way or another. Let's start simple: an object has a special attribute named __dict__, in which (references to) instance attributes - those you set with 'self.attr=val' - are stored. As I mentioned above, our object has another special attribute named __class__, that points to the class object - which, being an object, has itself a __dict__ attribute in which class attributes are stored, and a __class__ attribute pointing to the metaclass - the class of the class. Note BTW that Python functions being objects, the term 'attribute' include methods... (or more exactly, functions that will be turned into methods when looked up) Ok, now how is this used. <overly-simplified> When a name is looked up on an object (via the lookup operator '.'), it is first looked up in the object's __dict__. If this fails, it's then looked up in the class's __dict__, then in parent classes __dict__s. If the attribute object found is a callable, it is wrapped in a method object before. If the object is a descriptor (and has been found in a class __dict__), then the __get__ method of the descriptor is called.</overly-simplified> NB : a descriptor is an object that implements at least a __get__ method that takes an instance (the one on which the lookup occurs) and a class as params. Properties are descriptors. methods too. The __dict__ of a class is populated with the names and functions defined in the class: block. The __dict__ of an instance is populated with the attributes bound to the instance (usually inside method, and mostly inside the __init__() method, which is called just after object's creation) - with the exception that, if the name already refers to a descriptor having a __set__ method, then this will take precedence. All this is a 1000 feet high, overly simplified view of Python's object model - the lookup rules are a bit more complex (cf the __getattr__/__setattr__/__getattribute___ methods, and the complete definition of the dexcriptor protocol), and I didn't even talked about slots nor metacla
__dict__ is searched,
m.im_self is the object on which the method operates, and m.im_func is the function implementing the method. Calling m(arg-1, arg-2, ..., arg-n) is completely equivalent to calling m.im_func(m.im_self, arg-1, arg-2, ..., arg-n).