Closed GoogleCodeExporter closed 9 years ago
As robot just uses directly python, this is sort of a python bug actually. It
doesnt make sense to add that L to strings.
The actual limit depends from sys.maxint which again depends on whether you are
running on 32bit or 64bit python.
hex(sys.maxint+1) and also oct(sys.maxint+1) add that L. We can strip it away
in future.
Original comment by jussi.ao...@gmail.com
on 24 Jun 2014 at 2:45
maybe you should consider using the __format__ function of the int type.
eg instead of
ret = method(self._convert_to_integer(item, base)).upper()
where method is either hex, oct or bin
you could use
ret = format(self._convert_to_integer(item, base), fmt)
where fmt is either 'X', 'x', 'o', 'b'.
in this case you don't need to strip the suffix and don't need to use upper().
And you could merge the length handling and probably the prefix struff into the
format string .
Original comment by michael....@gmail.com
on 25 Jun 2014 at 8:48
This issue was updated by revision 70b63d951a8b.
Fixed by stripping the offending 'L'. Cannot use 'format' as suggested
in comments because it is not supported by Python/Jython 2.5 that we
still need to support.
Original comment by pekka.klarck
on 25 Jun 2014 at 11:48
BuiltIn.Convert to Hex/Octal
add 'L' suffix when input is bigger than sys.maxint
Original issue reported on code.google.com by
heiko.th...@gmail.com
on 24 Jun 2014 at 1:01