On 12/15/2011 03:56 AM, Eric Snow wrote:
On Tue, Dec 13, 2011 at 11:05 PM, Eric Snow<ericsnowcurren...@gmail.com> wrote:If you want to be more dynamic about it you can do it, but it involves black magic. Chances are really good that being explicit through your class definition is the right approach.
Note that the black spice is to use the __class__ attribute: foo.__class__.__exit__ = foo.goodbye -- http://mail.python.org/mailman/listinfo/python-list