[Tutor] refractoing and backward-compatibility

Timmie timmichelsen at gmx-topmail.de
Tue Sep 7 12:07:11 CEST 2010

I would like to refractor a module I write adding more functiosn and renaming
old ones.

In order to maintain backward compatibility with old scripts that reply on those
modules, I would like to introduce alias names for the old functions:

# refractored functions
def renamed_function():
    print 'got a new name'

# alias
old_function = renamed_function

Is this a good approach or are there better suggestions out there in the Python
community for such a purpose?

Thanks in advance for your hint,

More information about the Tutor mailing list