Your program is usually more readable if you bind, and thus create, class attributes only with statements inside the class body. However, rebinding them elsewhere may be necessary if you want to carry state information at a class, rather than instance, level; Python lets you do that, if you wish. There is no difference between a class attribute created in the class body, and one created or rebound outside the body by assigning to an attribute.
You can define a member (static) to a class outside the class definition.
Share this highlighthttp://www.safaribooksonline.com/a/python-in-a/20699084/