how to write a tutorial
Terry Reedy
tjreedy at udel.edu
Wed Jan 26 14:08:43 EST 2005
Xah the arrogant wrote, among other things,
# one can change data inside the class
x.i = 400
# one can also add new data to the class
x.j=4
print x.j
# or even override a method
x.square = 333
# (the following line will no longer work)
# print "3 squared is:", x.square(3)
# in Python, one must be careful not to
# overwrite data or methods defined in a
# class.
--------------
However, there are several errors in the above that would mislead a Python
learner. I advise any such to ignore Xah's writings.
Terry J. Reedy
More information about the Python-list
mailing list