Skip to content

Commit d1cd755

Browse files
committed
protocol/rq: remove dead code
1 parent c4978a1 commit d1cd755

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

Xlib/protocol/rq.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,6 @@ class BadDataError(Exception): pass
6060

6161
# print array_unsigned_codes, struct_to_array_codes
6262

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-
else:
79-
# Python 2: string char required to call ord()
80-
return ord(ch)
81-
8263

8364
class Field(object):
8465
"""Field objects represent the data fields of a Struct.

0 commit comments

Comments
 (0)