[CentralOH] Data Members / Properties - 2 questions
nick.albright at gmail.com
Sun Feb 14 07:52:20 CET 2010
Oh No, I was definitely thinking of the first way. Kartic, definitely be
curious how the code turns out!
On Sun, Feb 14, 2010 at 1:13 AM, Mark Erbaugh <mark at microenh.com> wrote:
> On Feb 13, 2010, at 10:41 PM, Nick Albright wrote:
> > Hey Mark!
> > I think you can use getattr() and setattr() instead of __dict__ and it'll
> catch the property.
> > I hope that helps! (And I hope my memory is right ;)
> > -Nick
> getattr() / setattr() did the trick. However, they aren't methods of the
> class so I had to call them:
> getattr(object, 'field')
> setattr(object, 'field', data)
> Is that what you were thinking, or were you thinking they were bound
> methods of the class:
> Getting this working saved me from having to do a major re-work of some of
> the code.
Please note that as of 1/20 I no longer have a land phone line, only my
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentralOH