def deprecated_name(name):
def decorator(func):<EOL><INDENT>"""<STR_LIT>"""<EOL>def func_wrapper(self):<EOL><INDENT>"""<STR_LIT>"""<EOL>if hasattr(self, name):<EOL><INDENT>return getattr(self, name)<EOL><DEDENT>else:<EOL><INDENT>return func(self)<EOL><DEDENT><DEDENT>return func_wrapper<EOL><DEDENT>return decorator<EOL>
Allow old method names for backwards compatability.