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:30 -0500, Jon Rafkind wrote:
> >>    
> >>
> >
> >More pythonic way would be:
> >
> >if platform.get("foobar"): dosomething..
> >
> >dict.get returns None if the key is not found, else the key
> >
> >  
> >
> I just committed the fake class way where __getitem__ returns 0 if the 
> internal dictionary doesnt have the key. Do you like the way you 
> proposed better?

No, the [""] way looks fine to me, and it's also what scons itself seems
to do with Environment()..

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/