moviepy.tools.deprecated_version_of#
- moviepy.tools.deprecated_version_of(func, old_name)[source]#
Indicates that a function is deprecated and has a new name.
func is the new function and old_name is the name of the deprecated function.
- Returns:
A function that does the same thing as func, but with a docstring and a printed message on call which say that the function is deprecated and that you should use func instead.
- Return type:
deprecated_func
Examples
# The badly named method 'to_file' is replaced by 'write_file' class Clip: def write_file(self, some args): # blablabla Clip.to_file = deprecated_version_of(Clip.write_file, 'to_file')