This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients cool-RR, ezio.melotti, mrabarnett, rhettinger
Date 2011-04-05.23:39:10
SpamBayes Score 1.0686207e-06
Marked as misclassified No
Message-id <1302046750.93.0.132123531409.issue11775@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2011-04-05 23:39:11rhettingersetrecipients: + rhettinger, ezio.melotti, mrabarnett, cool-RR
2011-04-05 23:39:10rhettingersetmessageid: <1302046750.93.0.132123531409.issue11775@psf.upfronthosting.co.za>
2011-04-05 23:39:10rhettingerlinkissue11775 messages
2011-04-05 23:39:10rhettingercreate