Tom Grove wrote: > I am trying the classes example from the tutorial because some other > class related stuff I am doing is not working either. > > Straight from Chapter 9: > > class MyClass: > "A simple example class" > i = 12345 > def f(self): > return 'hello world' > > > From here I run: > > x = MyClass
the tutorial says: Class instantiation uses function notation. Just pretend that the class object is a parameterless function that returns a new instance of the class. For example (assuming the above class): x = MyClass() creates a new instance of the class and assigns this object to the local variable x. </F> -- http://mail.python.org/mailman/listinfo/python-list