On Mon, Jan 19, 2009 at 4:22 AM, Phillip B Oldham <phillip.old...@gmail.com> wrote: > On Mon, Jan 19, 2009 at 12:15 PM, Chris Rebert <c...@rebertia.com> wrote: >> Assuming I'm interpreting you correctly (you're going to have to use >> something like a getter): > > Thanks, but I'm looking for a way to do it *without* using a getter as > I don't have easy access to the class (its being generated for me > elsewhere). Essentially I'd like to overwrite (if possible) the > default behavior when returning certain attributes on certain objects.
To my knowledge, you can't really "overwrite" that behavior without editing the class (or how it's generated). The next closest thing would be to write a proxy class that defines a __getattr__ method implementing the semantics you want. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list