Get rid of polyglot as_unicode
This commit is contained in:
1 parent
4b27f55f5b
commit
976ef5ce36
5 files changed
+11
-22
No files matched your search
@@ -13,13 +13,6 @@ def as_bytes(x, encoding='utf-8'):
|
||||
return str(x).encode(encoding)
|
||||
|
||||
|
||||
def as_unicode(x, encoding='utf-8', errors='strict'):
|
||||
return str(x)
|
||||
if isinstance(x, bytes):
|
||||
return x.decode(encoding, errors)
|
||||
return str(x)
|
||||
|
||||
|
||||
def reraise(tp, value, tb=None):
|
||||
try:
|
||||
if value is None:
|
||||
|
||||
Reference in new issue
Block a user