Hacker News new | past | comments | ask | show | jobs | submit login

The "kwds" technique is actually something I came up with independently to solve a different problem when I was using PyGame: ridiculously long argument lists when constructing sprites. In this case it significantly increased the flexibility and brevity of the code, although perhaps with a more complicated inheritance tree it wouldn't be worth it.

Nice to see this pattern being acknowledged somewhere else; I thought I was the only one that did that.




It's a great technique. I'm sure your PyGame code benefitted in a big way :-)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: