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
I do not think you can override a property. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -Original Message- From: tutor-bounces+ramit.prasad=jpmchase@python.org [mailto:tutor-bounces+r