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

Class SeparateUnicode

IPython/core/interactiveshell.py:265–274  ·  view source on GitHub ↗

r"""A Unicode subclass to validate separate_in, separate_out, etc. This is a Unicode based trait that converts '0'->'' and ``'\\n'->'\n'``.

Source from the content-addressed store, hash-verified

263
264
265class SeparateUnicode(Unicode):
266 r"""A Unicode subclass to validate separate_in, separate_out, etc.
267
268 This is a Unicode based trait that converts '0'->'' and ``'\\n'->'\n'``.
269 """
270
271 def validate(self, obj, value):
272 if value == '0': value = ''
273 value = value.replace('\\n','\n')
274 return super(SeparateUnicode, self).validate(obj, value)
275
276
277@undoc

Callers 1

InteractiveShellClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected