Python Decorators 3: Turning a function into a class instance @SebastiaanMath%C3%B4t
Python Decorators 3: Turning a function into a class instance  @SebastiaanMath%C3%B4t
Uploaded May 2018 | Updated September 2026, 2 weeks ago
[buymeacoffee.com/cogsci] In this video, I show how you can use a decorator to replace a function with a callable class instance that also has methods (class functions) and properties.

You can download the Jupyter Notebook for this video from osf.io/2npaf
Python Decorators 3: Turning a function into a class instanceOptical illusion: Invisibly morphing facesUsing caching and memoization to optimize Python performanceOptical illusion: Loch Ness after effectWriting csv, tsv, xlsx files in PythonOnline psychology experiments with OSWeb and JATOS (#2): Distributing linksPublishing a Python package on pip [PythonLiveLessons #6]Completing a code sketch (exec and eval) [PythonLiveLessons #1]Starting a new Python project (regular expressions) [PythonLiveLessons #0]Announcing PythonLiveLessons: weekly episodes about Python and more!The action potential of the Venus Fly TrapPython basics: So you thought you understood True, False, and, or?
Sebastiaan Mathôt |

Python Decorators 3: Turning a function into a class instance

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER