I've got a bit of code which has a dictionary nested within another
dictionary. I'm trying to print out specific values from the inner
dict in a formatted string and I'm running into a roadblock. I can't
figure out how to get a value from the inner dict into the string. To
make this even more
[EMAIL PROTECTED] schrieb:
I've got a bit of code which has a dictionary nested within another
dictionary. I'm trying to print out specific values from the inner
dict in a formatted string and I'm running into a roadblock. I can't
figure out how to get a value from the inner dict into the
At Thursday 24/8/2006 13:22, [EMAIL PROTECTED] wrote:
I've got a bit of code which has a dictionary nested within another
dictionary. I'm trying to print out specific values from the inner
dict in a formatted string and I'm running into a roadblock. I can't
figure out how to get a value from
Gabriel Genellina wrote:
At Thursday 24/8/2006 13:22, [EMAIL PROTECTED] wrote:
I've got a bit of code which has a dictionary nested within another
dictionary. I'm trying to print out specific values from the inner
dict in a formatted string and I'm running into a roadblock. I can't
figure
[EMAIL PROTECTED] wrote:
I've got a bit of code which has a dictionary nested within another
dictionary. I'm trying to print out specific values from the inner
dict in a formatted string and I'm running into a roadblock. I can't
figure out how to get a value from the inner dict into the
Le jeudi 24 août 2006 21:02, Fredrik Lundh a écrit :
class wrapper:
def __init__(self, dict):
self.dict = dict
def __getitem__(self, key):
try:
return self.dict[key]
except KeyError:
Quite the same idea, but without eval and the need