Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes: > However, be warned that there are two subtly different models for > delegation. Here's the one that people seem to forget: > > http://code.activestate.com/recipes/519639-true-lieberman-style-delegation-in-python/
Very interesting! The recipe at that URL works only on Python 2. Here is a version which works on both Python 2 and Python 3 <URL:https://gitorious.org/lieberman-style-delegation/lieberman-style-delegation/>. Licensed under the PSF license, which isn't really appropriate [0] but that's the license under which the original was received. [0] It's only appropriate for Python itself, and contributions to Python shouldn't even be licensed that way <URL:https://wiki.python.org/moin/PythonSoftwareFoundationLicenseFaq#What_if_I_want_to_contribute_my_code_to_the_PSF.3F>. Apache Software Foundation License 2.0 would be better. -- \ “When I get new information, I change my position. What, sir, | `\ do you do with new information?” —John Maynard Keynes | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list