On 17 Aug 2013, at 1:40 PM, David Gawlowski <hypr...@gmail.com> wrote: > Shoot, thanks, you're right, that field was a string and I changed it to do > math on elsewhere... > > Do you know how to take the far right number of a two digit number? Will > something like field[-1] work like it does on strings? > You can always do len(str(thing)), or str(thing)[-1] (though thing % 10 might be closer to what you want).
> On Aug 17, 2013 4:14 PM, "Jonathan Lundell" <jlund...@pobox.com> wrote: > On 17 Aug 2013, at 1:06 PM, davedigerati <hypr...@gmail.com> wrote: >> My app is working locally fine with a field defined as >> Field('Q2V','integer'), >> >> then in the controller I have been able to >> len(Q2V) >> >> but after upload to Google App Engine I am tripping with >> object of type 'long' has no len() >> >> I've been abel to discover that apparently GAE will map Integers to Longs >> for python- um, ok, so how can I measure the length then? Has anyone run >> into this and solved it? >> >> > > Python integers don't have len either. What are you trying to do? > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.