On Jun 27, 4:33 am, Jure Erznožnik wrote:
> When you write code like
> config = {"home" : "/home/test"}
> config["user1"] = config["home"] + "/user1"
>
> config["user1"] isn't stored in memory as config["home"] + "/user1",
> but as a concatenated string ("/home/test/user1"), composed of both
> tho
Norberto,
While certainly useful, this kind of functionality contradicts the way
today's "string" libraries work.
What you are proposing isn't dict self referencing, but rather strings
referencing other external data (in this case other strings from the
same dict).
When you write code like
config
En Wed, 24 Jun 2009 23:42:03 -0300, Carl Banks
escribió:
On Jun 24, 2:39 am, Norberto Lopes wrote:
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 another syntax
instead of:
a = { "foo" : "
On Jun 24, 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
> bad.
>
> What do you think of dictionaries having a self lookup in their
> declaration?
>
> Be able to do t
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"] = config["home"] + "/user1"
> >>> config["user2"] = config["home"] + "/user2"
> >>>
Norberto Lopes wrote:
On Jun 24, 1:21 pm, "Diez B. Roggisch" wrote:
Norberto Lopes wrote: ...
config = {"home" : "/home/test"}
config["user1"] = config["home"] + "/user1"
config["user2"] = config["home"] + "/user2"
config["python-dev"] = config["user1"] + "/py-dev"
I'd write this as:
home
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 "shoot
> >> > yourself in the foot", I think what I have in mind wou
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 "shoot
>> > yourself in the foot", I think what I have in mind would not be so
>> > bad.
>>
>> What kind of foot-shooting do
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
> > bad.
>
> > What do you think of dictionarie
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.
>
> What kind of foot-shooting do you have in mind?
>
a = { "foo
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
> bad.
>
> What do you think of dictionaries having a self lookup in their
> declaration?
>
> Be
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.
>
> What do you think of dictionaries having a self lookup in their
> declaration?
>
> Be able to do this:
>
> a = {"fo
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.
What kind of foot-shooting do you have in mind?
>
> What do you think of dictionaries having a self lookup in their
> de
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
14 matches
Mail list logo