Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I get that you wanted to simplify the example, but the example you've written really just doesn't make much sense, so it's hard to understand your point.

The API in the example is really bad. Accepting a dictionary, only to require a specific key in the dictionary, is the worst of both worlds. But then if you use .get to access the dictionary body instead of the attribute access, you'll take on additional performance penalties, and other solutions will start to compete.



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

Search: