tubeshowcase●1,121,289 videos♡ My collection 0
← Learn to Code

Learn to Code15:51

Writing Python Functions Like a Mad Scientist

ArjanCodes ↗

From the creator

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. Most Python developers stick with def, but there’s a whole world of alternative ways to define functions—some smart, some slightly cursed. In this video, I’ll walk you through 8 of them, from lambda to literal bytecode crafting, and yes... the last one might break your brain. 🔥 GitHub Repository: https://git.arjan.codes/2025/functions. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 0:39 1. Lambda Functions (Anonymous Functions) 1:44 2. Partial function application 3:19 3. Using Decorators to Define Functions at Runtime 5:35 4. Using a Class with __call__ (Callable Objects) 8:41 5. Using exec 9:46 6. Using eval 10:29 7. Using types.new_class 12:41 8. Manually Creating a Function from a Code Object 15:07 Final Thoughts #arjancodes #softwaredesign #python

Published 2025-06-06 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code