MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / getunicode

Method getunicode

21-async/mojifinder/bottle.py:1927–1932  ·  view source on GitHub ↗

Return the value as a unicode string, or the default.

(self, name, default=None, encoding=None)

Source from the content-addressed store, hash-verified

1925 return copy
1926
1927 def getunicode(self, name, default=None, encoding=None):
1928 ''' Return the value as a unicode string, or the default. '''
1929 try:
1930 return self._fix(self[name], encoding)
1931 except (UnicodeError, KeyError):
1932 return default
1933
1934 def __getattr__(self, name, default=unicode()):
1935 # Without this guard, pickle generates a cryptic TypeError:

Callers 1

__getattr__Method · 0.95

Calls 1

_fixMethod · 0.95

Tested by

no test coverage detected