(original) (raw)

Hum, timestamp and traceback\_limit attributed of GroupedStats can also be removed, they are just of the same attribute of the Snapshot class and GroupedStats is created from Snapshot.group\_by().

Le 27 oct. 2013 17:26, "Victor Stinner" <victor.stinner@gmail.com> a écrit :
\> \* do you have a better suggestion for GroupedStats.stats attribute or
\> GroupedStats.statistics() method: "stats" and "statistics" are too
\> close

An option is to modify GroupedStats to inherit from dict, so GroupedStats.stats would be GroupedStats directly.

> \* should GroupedStats.statistics() and GroupedStats.compare\_to()
\> always sort the result to drop the sort=True parameter?

The result is a list which can be bigger than 100,000 items. The question is if it would inefficient to sort the list twice.

Another option is to replace sort parameter with a new sort\_key parameter (callable), passed to list.sort as the ke parameter.

Victor