Pythonized function def