Hacker News new | ask | show | jobs
by BrendanEich 5002 days ago
Python does not have a default iterator for its objects. It does for dicts of course, but JS objects are not dicts (lots of issues there).
1 comments

I would just think default iterators are a sensible default especially for maps and that getting them in would be worth the very slight pain it might cause people wanting to attach custom iterators.
Maps have a default iterator as shown in my slides. Sets too.

Best to take this to es-discuss. For now, we're sticking with Python, which did not give its top-class (non-dict) Object a default iterator.