Skip to content

Commit 0a9de87

Browse files
author
Mark Pilgrim
committed
EncodingBytes.__new__ needs to call bytes.__new__, not str.__new__
1 parent 55caa34 commit 0a9de87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html5lib/inputstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class EncodingBytes(bytes):
455455
If the position is ever greater than the string length then an exception is
456456
raised"""
457457
def __new__(self, value):
458-
return str.__new__(self, value)
458+
return bytes.__new__(self, value)
459459

460460
def __init__(self, value):
461461
self._position = -1

0 commit comments

Comments
 (0)