MCPcopy Create free account
hub / github.com/catboost/catboost / Convertible

Class Convertible

library/python/strings/ut/test_strings.py:14–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13
14class Convertible(object):
15 text = u'текст'
16 text_utf8 = text.encode('utf-8')
17
18 def __unicode__(self):
19 return self.text
20
21 def __str__(self):
22 return self.text_utf8
23
24
25class ConvertibleToUnicodeOnly(Convertible):

Callers 5

test_to_basestringFunction · 0.85
test_to_unicodeFunction · 0.85
test_to_strFunction · 0.85

Calls 1

encodeMethod · 0.45

Tested by 5

test_to_basestringFunction · 0.68
test_to_unicodeFunction · 0.68
test_to_strFunction · 0.68