[Featureserver] Bug : fid=0

Yves Moisan yves.moisan at boreal-is.com
Mon Dec 15 16:30:34 EST 2008


>   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 ?

Cheers,

Yves




More information about the Featureserver mailing list