MCPcopy Create free account
hub / github.com/ipython/ipython / cast_unicode

Function cast_unicode

IPython/utils/py3compat.py:26–29  ·  view source on GitHub ↗
(s, encoding=None)

Source from the content-addressed store, hash-verified

24
25
26def cast_unicode(s, encoding=None):
27 if isinstance(s, bytes):
28 return decode(s, encoding)
29 return s
30
31def cast_bytes(s, encoding=None):
32 if not isinstance(s, bytes):

Callers 3

find_fileFunction · 0.90
dataMethod · 0.90
latex_to_pngFunction · 0.90

Calls 1

decodeFunction · 0.85

Tested by

no test coverage detected