Message133098
> 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. |
|
Date |
User |
Action |
Args |
2011-04-05 23:39:11 | rhettinger | set | recipients:
+ rhettinger, ezio.melotti, mrabarnett, cool-RR |
2011-04-05 23:39:10 | rhettinger | set | messageid: <1302046750.93.0.132123531409.issue11775@psf.upfronthosting.co.za> |
2011-04-05 23:39:10 | rhettinger | link | issue11775 messages |
2011-04-05 23:39:10 | rhettinger | create | |
|