We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd6ab7a commit 48a7c7fCopy full SHA for 48a7c7f
1 file changed
rsa/_compat.py
@@ -64,13 +64,6 @@ def byte_literal(s):
64
65
b = byte_literal
66
67
-try:
68
- # Python 2.6 or higher.
69
- bytes_type = bytes
70
-except NameError:
71
- # Python 2.5
72
- bytes_type = str
73
-
74
# To avoid calling b() multiple times in tight loops.
75
ZERO_BYTE = b('\x00')
76
EMPTY_BYTE = b('')
@@ -85,7 +78,7 @@ def is_bytes(obj):
85
78
:returns:
86
79
``True`` if ``value`` is a byte string; ``False`` otherwise.
87
80
"""
88
- return isinstance(obj, bytes_type)
81
+ return isinstance(obj, bytes)
89
82
90
83
91
84
def is_integer(obj):
0 commit comments