PEP 372 -- Adding an ordered directory to collections

Paul McGuire ptmcg at austin.rr.com
Mon Jun 16 10:54:19 EDT 2008


:)

Yes, I thought about that even as I was writing that post.  But I also said,
"ParseResults implements quite a bit of additional behavior that would not
be required or necessarily appropriate for  odict."  Even if odict existed,
I think I would have needed ParseResults anyway (but using an odict
internally might have simplified things for me, instead of the combined list
and dict that I have now).

-- Paul


-----Original Message-----
From: Shane Geiger [mailto:sgeiger at ncee.net] 
Sent: Monday, June 16, 2008 9:20 AM
To: Paul McGuire
Cc: python-list at python.org
Subject: Re: PEP 372 -- Adding an ordered directory to collections

Paul,

You seem to be contradicting yourself.  You may have never needed an odict,
yet you seem to have implemented one on your own.  Maybe you needed one but
did not realize it?

Shane
> 5. The more I think and write about this, the more struck I am at the 
> similarity of odict and the ParseResults class in pyparsing.  For 
> instance, in ParseResults, there is also support for dict-style and 
> list-style item referencing, and I chose to restrict some cases so 
> that using [] notation would not be ambiguous.  You might want to add 
> pyparsing.ParseResults as another reference of current "odicts in the 
> wild" (although ParseResults implements quite a bit of additional 
> behavior that would not be required or necessarily appropriate for 
> odict).
>
> I vote +0 on this PEP - I've never personally needed an odict, but I 
> can see how some of the XML and ORM coding would be simplified by one.
>
>   

--
Shane Geiger
IT Director
National Council on Economic Education
sgeiger at ncee.net  |  402-438-8958  |  http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy




More information about the Python-list mailing list