diff options
author | orivej <[email protected]> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /library/python/runtime_py3/__res.pyx | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/python/runtime_py3/__res.pyx')
-rw-r--r-- | library/python/runtime_py3/__res.pyx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/python/runtime_py3/__res.pyx b/library/python/runtime_py3/__res.pyx index 97190d9f293..c0e17b7de8f 100644 --- a/library/python/runtime_py3/__res.pyx +++ b/library/python/runtime_py3/__res.pyx @@ -1,5 +1,5 @@ -from _codecs import utf_8_decode, utf_8_encode - +from _codecs import utf_8_decode, utf_8_encode + from libcpp cimport bool from util.generic.string cimport TString, TStringBuf @@ -24,13 +24,13 @@ def key_by_index(idx): def find(s): cdef TString res - if isinstance(s, str): - s = utf_8_encode(s)[0] - + if isinstance(s, str): + s = utf_8_encode(s)[0] + if FindExact(TStringBuf(s, len(s)), &res): return res.c_str()[:res.length()] return None - - -include "importer.pxi" + + +include "importer.pxi" |