Re: [Tutor] Need help with the property function

2011-04-14 Thread Jim Byrnes
Dave Angel wrote: On 01/-10/-28163 02:59 PM, Jim Byrnes wrote: I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. class Critter(object): """ A virtual pet """ def __init__(self, name): print "A new critter is born" self.name = name

Re: [Tutor] Need help with the property function

2011-04-14 Thread Jim Byrnes
Steven D'Aprano wrote: Jim Byrnes wrote: I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. What's Dawson's book? Python Programming for the absolute beginner, by Michael Dawson Thanks for the explanation. It was exactly wit

Re: [Tutor] Need help with the property function

2011-04-13 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Jim Byrnes wrote: I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. class Critter(object): """ A virtual pet """ def __init__(self, name): print "A new critter is born" self.name = name def get_name(self)

Re: [Tutor] Need help with the property function

2011-04-13 Thread Steven D'Aprano
Jim Byrnes wrote: I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. What's Dawson's book? class Critter(object): """ A virtual pet """ def __init__(self, name): print "A new critter is born" self.name = n

Re: [Tutor] Need help with the property function

2011-04-13 Thread Prasad, Ramit
+ramit.prasad=jpmchase@python.org] On Behalf Of Jim Byrnes Sent: Wednesday, April 13, 2011 3:34 PM To: tutor@python.org Subject: [Tutor] Need help with the property function I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [

[Tutor] Need help with the property function

2011-04-13 Thread Jim Byrnes
I'm trying to teach myself OOP in python (again). The following code from Dawson's book runs fine, unaltered [1]. class Critter(object): """ A virtual pet """ def __init__(self, name): print "A new critter is born" self.name = name