The "class" keyword creates a "class object". The default constructor of these classes are their own names. So on this case Date() is the constructor. (The actual code is implemented in the __new__ method of the "object". Calling the constructor will create an "instance object".

Regualar functions (methods) defined in a class are "instance methods". They can only be called on "instance objects" and not on the "class object" as see in the 3rd example.

The attributes created with "self.something = value" belong to the individual instance object.

from __future__ import print_function

class Date(object):
    def __init__(self, Year, Month, Day):
        self.year  = Year
        self.month = Month   = Day

    def __str__(self):
        return 'Date({}, {}, {})'.format(self.year, self.month,

    def set_date(self, y, m, d):
        self.year = y
        self.month = m = d

from __future__ import print_function
from mydate import Date

d = Date(2013, 11, 22)

d.set_date(2014, 1, 27)

Date.set_date(2000, 2, 1)
Date(2013, 11, 22)
Date(2014, 1, 27)
Traceback (most recent call last):
  File "", line 10, in <module>
    mydate.Date.set_date(2000, 2, 1)
TypeError: unbound method set_date() must be called with
           Date instance as first argument (got int instance instead)