[Featureserver] Bug : fid=0

Christopher Schmidt crschmidt at metacarta.com
Mon Dec 15 17:22:15 EST 2008


On Mon, Dec 15, 2008 at 04:30:34PM -0500, Yves Moisan wrote:
> 
> >   svn diff -r580:581 http://svn.featureserver.org/trunk/featuresrver/ 
> 
> id != False
> 
> gives False if I pass in an value of 0.  My initial use case is that I
> want the condition to evaluate to True if I pass in any integer
> including 0 but Python treats 0 as False :-(.  I tried a bunch of
> different things including importing types and trying to check if
> type(id) != bool (for some reason I can't do that) and the only thing
> that got my use casee working is
> 
> id is not False
> 
> That evaluates to true for id >= 0.  Do you want me to do a patch or do
> you want to check things for yourself and make sure this makes sense ?

A patch would be great; I don't really have a great setup for this at
the moment, so something you can test is best. Thanks.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list