Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pygolang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
pygolang
Commits
3073ac98
Commit
3073ac98
authored
Jan 29, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
golang: qq: Use u for UTF-8 decoding
U is preffered way to make sure an object is unicode string.
parent
8c459a99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
golang/_golang.pyx
golang/_golang.pyx
+2
-2
No files found.
golang/_golang.pyx
View file @
3073ac98
...
@@ -828,7 +828,7 @@ def pyqq(obj):
...
@@ -828,7 +828,7 @@ def pyqq(obj):
# `printf('%s', qq(obj))` should work. For this make sure qobj is always a
# `printf('%s', qq(obj))` should work. For this make sure qobj is always a
# str - not bytes under py3 (if it was bytes it will print e.g. as b'...')
# str - not bytes under py3 (if it was bytes it will print e.g. as b'...')
if
six
.
PY3
and
isinstance
(
qobj
,
bytes
)
:
if
six
.
PY3
:
qobj
=
qobj
.
decode
(
'UTF-8'
)
# TODO use u
qobj
=
pyu
(
qobj
)
return
qobj
return
qobj
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment