Skip to content

The Craziest fn Thing I've Ever Seen (and It Lives in CPython!!!)

Lightning Talk (schedule TBD)

I am enamored with dataclasses. I love them in Python, I love them in Kotlin. A while back I was looking for a Kotlin dataclass feature in Python, and was disappointed to find it wasn't there. I went digging into the CPython source code to see if it could be added and found the craziest function I'd ever seen, _create_fn, and it's used everywhere in the dataclass implementation!

Join me as I shared what I found out about my dear dataclasses, and get a better understand of decorators and metaprogramming in Python!

Presented by

Daniel Lindeman