equal
deleted
inserted
replaced
76 |
76 |
77 bytechr = struct.Struct('>B').pack |
77 bytechr = struct.Struct('>B').pack |
78 |
78 |
79 def iterbytestr(s): |
79 def iterbytestr(s): |
80 """Iterate bytes as if it were a str object of Python 2""" |
80 """Iterate bytes as if it were a str object of Python 2""" |
81 return iter(s[i:i + 1] for i in range(len(s))) |
81 return map(bytechr, s) |
82 |
82 |
83 def sysstr(s): |
83 def sysstr(s): |
84 """Return a keyword str to be passed to Python functions such as |
84 """Return a keyword str to be passed to Python functions such as |
85 getattr() and str.encode() |
85 getattr() and str.encode() |
86 |
86 |