增加了util里的get_error_msg
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
import types
|
||||
import io as _io
|
||||
|
||||
|
||||
def text_encoding(encoding, stacklevel=2):
|
||||
"""
|
||||
Stubbed version of io.text_encoding as found in Python 3.10
|
||||
"""
|
||||
return encoding
|
||||
|
||||
|
||||
def copy_module(mod, **defaults):
|
||||
copy = types.ModuleType(mod.__name__, doc=mod.__doc__)
|
||||
vars(copy).update(defaults)
|
||||
vars(copy).update(vars(mod))
|
||||
return copy
|
||||
|
||||
|
||||
io = copy_module(_io, text_encoding=text_encoding)
|
||||
Reference in New Issue
Block a user