Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
14
class
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
25
class
ConvertibleToUnicodeOnly(Convertible):
Callers
5
test_to_basestring
Function · 0.85
test_to_unicode
Function · 0.85
test_to_str
Function · 0.85
test_stringize_deep_nonstr
Function · 0.85
test_unicodize_deep_nonstr
Function · 0.85
Calls
1
encode
Method · 0.45
Tested by
5
test_to_basestring
Function · 0.68
test_to_unicode
Function · 0.68
test_to_str
Function · 0.68
test_stringize_deep_nonstr
Function · 0.68
test_unicodize_deep_nonstr
Function · 0.68