-# Copyright (c) 2010 Nicira Networks
+# Copyright (c) 2010, 2011 Nicira Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# XXX still needed?
if type(x) == float:
integer = int(x)
- if integer == x and integer >= -2**53 and integer < 2**53:
+ if integer == x and -2**53 <= integer < 2**53:
return integer
return x