Re: Dictionary self lookup

2009-06-24 Thread Norberto Lopes
On Jun 24, 6:26 pm, Scott David Daniels wrote: > Norberto Lopes wrote: > > On Jun 24, 1:21 pm, "Diez B. Roggisch" wrote: > >> Norberto Lopes wrote: ... > >>> config = {"home" : "/home/test"} > >>> config["user1&q

Re: Dictionary self lookup

2009-06-24 Thread Norberto Lopes
On Jun 24, 1:21 pm, "Diez B. Roggisch" wrote: > Norberto Lopes wrote: > > On Jun 24, 11:59 am, "Diez B. Roggisch" wrote: > >> Norberto Lopes wrote: > >> > Hi all. > >> > Assuming that python dictionaries already provide a bit of &q

Re: Dictionary self lookup

2009-06-24 Thread Norberto Lopes
On Jun 24, 12:05 pm, Chris Rebert wrote: > On Wed, Jun 24, 2009 at 2:39 AM, Norberto Lopes wrote: > > Hi all. > > Assuming that python dictionaries already provide a bit of "shoot > > yourself in the foot", I think what I have in mind would not be so >

Re: Dictionary self lookup

2009-06-24 Thread Norberto Lopes
On Jun 24, 11:59 am, "Diez B. Roggisch" wrote: > Norberto Lopes wrote: > > Hi all. > > Assuming that python dictionaries already provide a bit of "shoot > > yourself in the foot", I think what I have in mind would not be so > > bad. > >

Dictionary self lookup

2009-06-24 Thread Norberto Lopes
Hi all. Assuming that python dictionaries already provide a bit of "shoot yourself in the foot", I think what I have in mind would not be so bad. What do you think of dictionaries having a self lookup in their declaration? Be able to do this: a = {"foo" : "foo1", "bar" : a["foo"]} # or with anot