interface boilerplate

John Hunter jdhunter at
Mon Oct 18 16:34:04 CEST 2004

>>>>> "Alex" == Alex Martelli <aleaxit at> writes:

    Alex> Supporting old versions is never going to be easy -- I don't
    Alex> even have a 2.2 installation around to do such tests, any
    Alex> more.  Perhaps for versions < 2.3 you could simply degrade
    Alex> gracefully to perform no renaming (and for versions >= 2.4
    Alex> do the renaming the right way, by assigning to f.func_name
    Alex> and returning f)... those who choose to stick with 2.2 will
    Alex> just have to account that as one of the many limitations and
    Alex> slow-downs their choice buys them...

It is a pain -- for a fair number of linux boxes, though, 2.2 is still
the default.  Perhaps a better alternative for 2.2 is to simply fall back on

__fmt = """\
def %(name)s(*args, **kwargs):
        ret =  gca().%(name)s(*args, **kwargs)
    except ValueError, msg:
        msg = raise_msg_to_str(msg)
        return ret
%(name)s.__doc__ = Axes.%(name)s.__doc__

for name in _methods:


More information about the Python-list mailing list