On Fri, Jan 22, 2016 at 09:32:23PM -0500, Russell Bryant wrote:
> Python 2 has both long and int types.  Python 3 only has int, which
> behaves like long.
> 
> In the case of needing a set of integer types, we can use
> six.integer_types which includes int and long for Python 2 and just int
> for Python 3.
> 
> We can convert all cases of long(value) to int(value), because as of
> Python 2.4, when the result of an operation would be too big for an int,
> the type is automatically converted to a long.
> 
> There were several places in this patch doing type comparisons.  The
> preferred way to do this is using the isinstance() or issubclass()
> built-in functions, so I converted the similar checks nearby while I was
> at it.
> 
> Signed-off-by: Russell Bryant <russ...@ovn.org>

I didn't know that isinstance took a sequence of types.  Nice.

Acked-by: Ben Pfaff <b...@ovn.org>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to