int vs long is a python 2.x annoyance. It goes away in 3.x as the int
vs long distinction disappears.
Regardless, the correct thing to do in 2.x is to accept both int and
long types, this unit test is being too strict. What matters is the
actual value, not the exact type. In decoder_test.py
Re
On Sun, Oct 05, 2008 at 11:41:53AM +0200, Iustin Pop wrote:
> I don't understand exactly what's going on, but I think the problem is
> that an i386 system cannot represent that constant as int, but amd64 can
> (not sure why...):
> $ python32 -c 'print type(0x)'
>
> $ python64 -c 'print ty
On Sun, Oct 05, 2008 at 11:41:53AM +0200, Iustin Pop wrote:
> i386: result is , expected is
> amd64: result is , expected is
>
> I don't understand exactly what's going on, but I think the problem is
> that an i386 system cannot represent that constant as int, but amd64 can
> (not sure why...):
[+petar]
(Same problem as the other thread.)
On Sun, Oct 5, 2008 at 2:41 AM, Iustin Pop <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> Revision 50 changed the following line in
> python/google/protobuf/internal/decoder_test.py:
>
> 122: ['sfixed32', decoder.Decoder.ReadSFixed32, -1,
> 'ReadLit
On Sun, Oct 05, 2008 at 02:48:56AM -0700, [EMAIL PROTECTED] wrote:
>
> Wow we submitted the same bug 6 minutes off of each other.
> The test also passes with a fix by changing long(-1) to -1 on the line
> above. I'm not sure which change is the 'correct' one.
Yes, but if you change long(-1) to
You're right. I didn't read your email carefully. This is indeed
strange behavior of Python.
Frank
On Oct 5, 3:05 am, Iustin Pop <[EMAIL PROTECTED]> wrote:
> On Sun, Oct 05, 2008 at 02:48:56AM -0700, [EMAIL PROTECTED] wrote:
>
> > Wow we submitted the same bug 6 minutes off of each other.
> >
Wow we submitted the same bug 6 minutes off of each other.
The test also passes with a fix by changing long(-1) to -1 on the line
above. I'm not sure which change is the 'correct' one.
Frank
On Oct 5, 2:41 am, Iustin Pop <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> Revision 50 changed the followi