[Tutor] SQLite3 DB Field Alphabetizing

Joel Goldstick joel.goldstick at gmail.com
Tue Oct 12 16:57:39 CEST 2010

On Tue, Oct 12, 2010 at 10:23 AM, Alan Gauld <alan.gauld at btinternet.com>wrote:

> "David Hutto" <smokefloat at gmail.com> wrote
>  > Did you include an ORDER BY?
>> See three posts above, line 6.
> Just a guess.  You strip the letter u from your list items.  Is there a
letter u in each of them?  You are sorting on the item before you strip the
u.  So, if the one strange item in your list has a u in front, but no others
do, it will end up ordering as in your results.

>                for graphname in self.orderbygname:
>                        self.liorder.append(str(graphname[0]).lstrip('u'))
> __________________________________________

Joel Goldstick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101012/3df4c477/attachment-0001.html>

More information about the Tutor mailing list