On 06/12/12 15:42, Mark Lawrence wrote:
On 05/12/2012 16:58, Steven D'Aprano wrote:

And here is how it should be written in Python:

class Example(object):
def __init__(self, value):
self.x = value


instance = Example(42)
print instance.x # gives 42
instance.setx(23)



And introduce error handling while we're at it? Should we consider a 
CutAndPasteError in Python? :)


Oh the shame! I am disgraced!

/me hangs head in shame


Thanks for catching the error.




--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to