💡 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
In questa pagina del sito puoi guardare il video online Writing Python Functions Like a Mad Scientist della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ArjanCodes 06 giugno 2025, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 33,223 volte e gli è piaciuto 1.4 mille spettatori. Buona visione!