Re: relation class

2009-04-26 Thread Aaron Brady
wrote: > > > > > Hi all, > > > > > > I think Python should have a relation class in the standard library. > > > > > Fat chance. > > > > > Perhaps I'm not understanding "relation" correctly, but are you not &

Re: relation class

2009-04-23 Thread Aaron Brady
On Apr 22, 11:34 pm, Aaron Brady wrote: > On Apr 22, 11:52 am, Aaron Brady wrote: > > > On Apr 22, 12:09 am, Chris Rebert wrote: > > > > On Tue, Apr 21, 2009 at 5:51 PM, Aaron Brady wrote: > > > > Hi all, > > > > > I think Python s

Re: relation class

2009-04-22 Thread Aaron Brady
On Apr 22, 11:52 am, Aaron Brady wrote: > On Apr 22, 12:09 am, Chris Rebert wrote: > > > On Tue, Apr 21, 2009 at 5:51 PM, Aaron Brady wrote: > > > Hi all, > > > > I think Python should have a relation class in the standard library. > > > Fat chance. >

Re: relation class

2009-04-22 Thread Aaron Brady
On Apr 22, 12:09 am, Chris Rebert wrote: > On Tue, Apr 21, 2009 at 5:51 PM, Aaron Brady wrote: > > Hi all, > > > I think Python should have a relation class in the standard library. > > Fat chance. > > Perhaps I'm not understanding "relation&qu

Re: relation class

2009-04-21 Thread Chris Rebert
On Tue, Apr 21, 2009 at 5:51 PM, Aaron Brady wrote: > Hi all, > > I think Python should have a relation class in the standard library. > Fat chance. Perhaps I'm not understanding "relation" correctly, but are you not aware of http://docs.python.org/library/sqlite3.

relation class

2009-04-21 Thread Aaron Brady
Hi all, I think Python should have a relation class in the standard library. Fat chance. I want to write a recipe for it, but I don't know how. I want your advice on some of the trade-offs, what it should look like, what the pitfalls are, different strengths and weaknesses, etc. Fundamen

Re: reverse dict lookup & Relation class

2009-01-17 Thread Aaron Brady
On Jan 17, 10:45 am, Steven D'Aprano wrote: > On Sat, 17 Jan 2009 00:24:21 -0800, Aaron Brady wrote: > > Can you make it work for a 3-way lookup? > > What do you mean "3-way lookup"? > > I'm going to take a guess... > > A maps to B, B maps to C, and C maps to A. > > Is that what you mean? So long

Re: reverse dict lookup & Relation class

2009-01-17 Thread Steven D'Aprano
On Sat, 17 Jan 2009 00:24:21 -0800, Aaron Brady wrote: > Can you make it work for a 3-way lookup? What do you mean "3-way lookup"? I'm going to take a guess... A maps to B, B maps to C, and C maps to A. Is that what you mean? -- Steven -- http://mail.python.org/mailman/listinfo/python-lis

Re: reverse dict lookup & Relation class

2009-01-17 Thread Aaron Brady
On Jan 16, 5:03 am, Steven D'Aprano wrote: > On Wed, 14 Jan 2009 16:30:36 -0800, Aaron Brady wrote: > > Hi, this is a continuation of something that comes up now and again > > about reverse lookups on dictionaries, as well as a follow-up to my > > pursuit of a R

Re: reverse dict lookup & Relation class

2009-01-16 Thread Steven D'Aprano
On Wed, 14 Jan 2009 16:30:36 -0800, Aaron Brady wrote: > Hi, this is a continuation of something that comes up now and again > about reverse lookups on dictionaries, as well as a follow-up to my > pursuit of a Relation class from earlier. [...] > What's the best way to construc

Re: reverse dict lookup & Relation class

2009-01-16 Thread Aaron Brady
On Jan 14, 7:54 pm, MRAB wrote: > Aaron Brady wrote: > > Hi, this is a continuation of something that comes up now and again > > about reverse lookups on dictionaries, as well as a follow-up to my > > pursuit of a Relation class from earlier. > > > For a reverse loo

Re: reverse dict lookup & Relation class

2009-01-16 Thread Aaron Brady
On Jan 14, 7:04 pm, Chris Rebert wrote: > On Wed, Jan 14, 2009 at 4:30 PM, Aaron Brady wrote: > > Hi, this is a continuation of something that comes up now and again > > about reverse lookups on dictionaries, as well as a follow-up to my > > pursuit of a Relation class from

Re: reverse dict lookup & Relation class

2009-01-14 Thread MRAB
Aaron Brady wrote: Hi, this is a continuation of something that comes up now and again about reverse lookups on dictionaries, as well as a follow-up to my pursuit of a Relation class from earlier. For a reverse lookup, you just need two lookups. name= {} phone= {} name[ '555-963'

Re: reverse dict lookup & Relation class

2009-01-14 Thread Chris Rebert
On Wed, Jan 14, 2009 at 4:30 PM, Aaron Brady wrote: > Hi, this is a continuation of something that comes up now and again > about reverse lookups on dictionaries, as well as a follow-up to my > pursuit of a Relation class from earlier. > > For a reverse lookup, you just need two

reverse dict lookup & Relation class

2009-01-14 Thread Aaron Brady
Hi, this is a continuation of something that comes up now and again about reverse lookups on dictionaries, as well as a follow-up to my pursuit of a Relation class from earlier. For a reverse lookup, you just need two lookups. name= {} phone= {} name[ '555-963' ]= 'Joan' phone