| Re: [AD] trouble with scons build system |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
On Sat, 2006-03-18 at 18:08 -0500, Jon Rafkind wrote:
> if "foobar" in platform and platform["foobar"]:
> ...dosomething...
>
More pythonic way would be:
if platform.get("foobar"): dosomething..
dict.get returns None if the key is not found, else the key
--
Elias Pschernig
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |