class Student(object): """a student class""" def __init__(self, name): print "I'm a new Student object." self.__name = name def __str__(self): return "Student object\n name: " + self.__name def talk(self): print "Hello. I'm an instance of class Student named", self.__name