itertools.groupby

Steve Howell showell30 at yahoo.com
Sun May 27 13:28:41 EDT 2007


--- 7stud <bbxx789_05ss at yahoo.com> wrote:

> Bejeezus.  The description of groupby in the docs is
> a poster child
> for why the docs need user comments.  Can someone
> explain to me in
> what sense the name 'uniquekeys' is used this
> example: [...]
> 

The groupby method has its uses, but it's behavior is
going to be very surprising to anybody that has used
the "group by" syntax of SQL, because Python's groupby
method will repeat groups if your data is not sorted,
whereas SQL has the luxury of (knowing that it's)
working with a finite data set, so it can provide the
more convenient semantics.




       
____________________________________________________________________________________You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html



More information about the Python-list mailing list