[Python-Dev] anonymous blocks
Tim Delaney
tcdelaney at optusnet.com.au
Tue Apr 19 23:47:14 CEST 2005
Guido van Rossum wrote:
> As I said before, I'm not sure why keeping get_foo etc. out of the
> class namespace is such a big deal. In fact, I like having them there
> (sometimes they can even be handy, e.g. you might be able to pass the
> unbound get_foo method as a sort key).
Not to mention that it's possible to override get_foo in subclasses if done
right ...
Two approaches are here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/408713
Tim Delaney
More information about the Python-Dev
mailing list