Skip to content

Commit d57d02e

Browse files
committed
Remove leftover Python 2 compatibility shim
In Python 3, __str__ should not return bytes.
1 parent 22a6738 commit d57d02e

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/PIL/PdfParser.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,11 @@ def __bytes__(self):
241241
result.extend(make_bytes("#%02X" % b))
242242
return bytes(result)
243243

244-
__str__ = __bytes__
245-
246244

247245
class PdfArray(list):
248246
def __bytes__(self):
249247
return b"[ " + b" ".join(pdf_repr(x) for x in self) + b" ]"
250248

251-
__str__ = __bytes__
252-
253249

254250
class PdfDict(collections.UserDict):
255251
def __setattr__(self, key, value):

0 commit comments

Comments
 (0)