Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> How is it "not the Python way"? 

Because having an API within an API greatly complexifies the interface, making 
harder to implement, harder to understand, and harder to learn.

> Why is it okay to make `dict.keys` into a smart object
> but it's not okay to make `Counter.elements` a smart object?

That was the exception, not the rule.  For the most part,
we don't do multi-level APIs unless there is a *compelling*
reason.  In the case of dict views, there was already a
known successful model in Java using this API and Guido
liked it.  Subsequent experience in teaching Python shows
that people have a hard time grasping it as first.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11775>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to