Re: [web2py] problem with type Int

2011-03-10 Thread Martín Mulone
Better use: if isinstance(value, int): instead of if type(value)==int: 2011/3/9 LightOfMooN > value=request.vars.myvar > > try: >value = int(value) > except: >pass > > if type(value)==int: >insert() > > it rises > (current transaction is aborted, > commands ignored until end

[web2py] problem with type Int

2011-03-09 Thread LightOfMooN
value=request.vars.myvar try: value = int(value) except: pass if type(value)==int: insert() it rises (current transaction is aborted, commands ignored until end of transaction block) even if value > 2147483647 But why? It's so strange, because type(value) must be long.