objstr: Add str.encode() and bytes.decode() methods.
These largely duplicate str() & bytes() constructors' functionality, but can be used to achieve Python2 compatibility.
This commit is contained in:
@@ -10,6 +10,7 @@ if platform.python_version_tuple()[0] == '2':
|
||||
from htmlentitydefs import codepoint2name
|
||||
elif platform.python_version_tuple()[0] == '3':
|
||||
from html.entities import codepoint2name
|
||||
codepoint2name[ord('-')] = 'hyphen';
|
||||
|
||||
# add some custom names to map characters that aren't in HTML
|
||||
codepoint2name[ord('.')] = 'dot'
|
||||
|
||||
Reference in New Issue
Block a user