On Fri, Nov 20, 2009 at 12:14 PM, Shashank Singh <
shashank.sunny.si...@gmail.com> wrote:

> Are you sure your key values are 2-tuples in levelDict?
>

No. Here's some tweaked code:

    cursor.execute('select category from categories order by category')
    theTree = expand(cursor.fetchall())
    print theTree

Now, categories only has one category called 'cat1'. Here's what it prints:

{'cat1': {}}

Now what I don't understand about the above code, provided by Dennis Lee
Bieber, is the "expand" statement. Nor could I find any documentation
googling either "expand python" or "expand fetchall python". Could someone
please explain what this code does?
TIA,
V
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to