We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4978a1 commit d1cd755Copy full SHA for d1cd755
1 file changed
Xlib/protocol/rq.py
@@ -60,25 +60,6 @@ class BadDataError(Exception): pass
60
61
# print array_unsigned_codes, struct_to_array_codes
62
63
-def _method(func, instance):
64
- """Dynamically create a new method.
65
-
66
- Exposes a common interface for types.MethodType across Python 3 and 2
67
- """
68
- if sys.version_info[0] >= 3:
69
- return types.MethodType(func, instance)
70
- else:
71
- return types.MethodType(func, instance, type(instance))
72
73
-def _to_ord(ch):
74
- """Get char code in a cross-Python way"""
75
- if isinstance(ch, int):
76
- # Python 3: bytes char is already an integer, no need to call ord()
77
- return ch
78
79
- # Python 2: string char required to call ord()
80
- return ord(ch)
81
82
83
class Field(object):
84
"""Field objects represent the data fields of a Struct.
0 commit comments