[Python-Dev] annoying dictionary problem, non-existing keys
bvidinli at gmail.com
Thu Apr 24 10:13:25 CEST 2008
i use dictionaries to hold some config data,
and so on...
when i try to process conf, i have to code every time like:
this is very annoying.
in php, i was able to code only like:
in python, this fails, because, if key1 does not exists, it raises an exception.
is there a way to directly get value of an array/tuple/dict item by key,
as in php above, even if key may not exist, i should not check if key exist,
i should only use it, if it does not exist, it may return only empty,
just as in php....
i hope you understand my question...
iletisim bilgileri (Tercih sirasina gore):
skype: bvidinli (sesli gorusme icin, www.skype.com)
msn: bvidinli at iyibirisi.com
More information about the Python-Dev