On Sat, Sep 20, 2014 at 6:53 AM, Noufal Ibrahim KV <nou...@nibrahim.net.in> wrote:
> On Sat, Sep 20 2014, Anand Chitipothu wrote: > > > [...] > > > Oh, that feels like PHP. That style seems to be popular in that side of > the > > world. > > > > It might be a good idea to add consolidate method on the return value. > > Something like: > > > > class StatsList(list): > > def consolidate(self): > > .. > > > > print get_stats(..) > > print get_stats(..).consolidate() > > [...] > > That's a nice solution. It's similar to what Senthil suggested but I > like the API better. Alternatively, would it be possible to model Stats/StatsList as a composite hierarchy (potentially with Courtesy Implementations <http://martinfowler.com/bliki/CourtesyImplementation.html>)? - d _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers