You can still reach the object on the __builtin__
module:
import __builtin__
__builtin__.any(i % 3 for i in [3, 3, 4, 4, 3])
(The module was renamed to builtins
in Python 3; underscores removed, made plural).
You could assing any
to a different name before you import all from numpy
:
bltin_any = any
from numpy import *
bltin_any(i % 3 for i in [3, 3, 4, 4, 3])
or don't use import *
. Use import numpy as np
perhaps, and use np.any()
to use the NumPy version that way.