1.1 --- a/lib/__builtins__/int.py Sun Mar 26 18:03:40 2017 +0200
1.2 +++ b/lib/__builtins__/int.py Tue Mar 28 22:12:11 2017 +0200
1.3 @@ -21,7 +21,7 @@
1.4
1.5 from __builtins__.operator import _negate
1.6 from __builtins__.unicode import utf8string
1.7 -from native import isinstance as _isinstance, get_maxint, get_minint, \
1.8 +from native import get_maxint, get_minint, is_int, \
1.9 int_add, int_and, int_div, int_eq, int_gt, int_lt, int_mod, \
1.10 int_mul, int_ne, int_neg, int_not, int_or, int_pow, \
1.11 int_str, int_sub, int_xor
1.12 @@ -48,7 +48,7 @@
1.13
1.14 "Perform 'op' on this int and 'other' if appropriate."
1.15
1.16 - if _isinstance(other, int):
1.17 + if is_int(other):
1.18 return op(self, other)
1.19 else:
1.20 return NotImplemented
1.21 @@ -57,7 +57,7 @@
1.22
1.23 "Perform 'op' on 'other' and this int if appropriate."
1.24
1.25 - if _isinstance(other, int):
1.26 + if is_int(other):
1.27 return op(other, self)
1.28 else:
1.29 return NotImplemented
2.1 --- a/lib/__builtins__/mapping.py Sun Mar 26 18:03:40 2017 +0200
2.2 +++ b/lib/__builtins__/mapping.py Tue Mar 28 22:12:11 2017 +0200
2.3 @@ -20,7 +20,7 @@
2.4 """
2.5
2.6 from __builtins__.span import _max
2.7 -from native import isinstance as _isinstance
2.8 +from native import is_int
2.9
2.10 class hashtable:
2.11
2.12 @@ -66,7 +66,7 @@
2.13
2.14 index = key.__hash__()
2.15
2.16 - if not _isinstance(index, int):
2.17 + if not is_int(index):
2.18 raise TypeError
2.19
2.20 return index % len(self.buckets)
3.1 --- a/lib/__builtins__/types.py Sun Mar 26 18:03:40 2017 +0200
3.2 +++ b/lib/__builtins__/types.py Tue Mar 28 22:12:11 2017 +0200
3.3 @@ -3,7 +3,7 @@
3.4 """
3.5 Common type validation functions.
3.6
3.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
3.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
3.9
3.10 This program is free software; you can redistribute it and/or modify it under
3.11 the terms of the GNU General Public License as published by the Free Software
3.12 @@ -19,13 +19,13 @@
3.13 this program. If not, see <http://www.gnu.org/licenses/>.
3.14 """
3.15
3.16 -from native import isinstance as _isinstance
3.17 +from native import isinstance as _isinstance, is_int
3.18
3.19 def check_int(i):
3.20
3.21 "Check the given int 'i'."
3.22
3.23 - if not _isinstance(i, int):
3.24 + if not is_int(i):
3.25 raise ValueError(i)
3.26
3.27 def check_string(s):
4.1 --- a/lib/posix/iconv.py Sun Mar 26 18:03:40 2017 +0200
4.2 +++ b/lib/posix/iconv.py Tue Mar 28 22:12:11 2017 +0200
4.3 @@ -3,7 +3,7 @@
4.4 """
4.5 POSIX character set conversion functions.
4.6
4.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
4.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
4.9
4.10 This program is free software; you can redistribute it and/or modify it under
4.11 the terms of the GNU General Public License as published by the Free Software
4.12 @@ -19,7 +19,7 @@
4.13 this program. If not, see <http://www.gnu.org/licenses/>.
4.14 """
4.15
4.16 -from __builtins__.types import check_int, check_string
4.17 +from __builtins__.types import check_string
4.18 from native import iconv, iconv_close, iconv_open, iconv_reset
4.19
4.20 class IncompleteSequenceError(OSError):