1.1 --- a/lib/__builtins__/identity.py Fri Dec 09 16:26:50 2016 +0100
1.2 +++ b/lib/__builtins__/identity.py Fri Dec 09 17:27:30 2016 +0100
1.3 @@ -19,7 +19,7 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -import native
1.8 +from native import isinstance as _isinstance, issubclass as _issubclass
1.9
1.10 def callable(obj):
1.11
1.12 @@ -50,13 +50,13 @@
1.13 either a class or a sequence of classes.
1.14 """
1.15
1.16 - if native.isinstance(cls_or_tuple, tuple):
1.17 + if _isinstance(cls_or_tuple, tuple):
1.18 for cls in cls_or_tuple:
1.19 - if obj.__class__ is cls or isclass(cls) and native.isinstance(obj, cls):
1.20 + if obj.__class__ is cls or isclass(cls) and _isinstance(obj, cls):
1.21 return True
1.22 return False
1.23 else:
1.24 - return obj.__class__ is cls_or_tuple or isclass(cls_or_tuple) and native.isinstance(obj, cls_or_tuple)
1.25 + return obj.__class__ is cls_or_tuple or isclass(cls_or_tuple) and _isinstance(obj, cls_or_tuple)
1.26
1.27 def issubclass(obj, cls_or_tuple):
1.28
1.29 @@ -68,13 +68,13 @@
1.30
1.31 if not isclass(obj):
1.32 return False
1.33 - elif native.isinstance(cls_or_tuple, tuple):
1.34 + elif _isinstance(cls_or_tuple, tuple):
1.35 for cls in cls_or_tuple:
1.36 - if obj is cls or isclass(cls) and native.issubclass(obj, cls):
1.37 + if obj is cls or isclass(cls) and _issubclass(obj, cls):
1.38 return True
1.39 return False
1.40 else:
1.41 - return obj is cls_or_tuple or isclass(cls_or_tuple) and native.issubclass(obj, cls_or_tuple)
1.42 + return obj is cls_or_tuple or isclass(cls_or_tuple) and _issubclass(obj, cls_or_tuple)
1.43
1.44 def repr(obj):
1.45