projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0183ec9
)
fix str default values in embedded signatures in Py3
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 17 Feb 2010 08:15:53 +0000
(09:15 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 17 Feb 2010 08:15:53 +0000
(09:15 +0100)
Cython/Compiler/AutoDocTransforms.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/AutoDocTransforms.py
b/Cython/Compiler/AutoDocTransforms.py
index c41bbbf1620b7387d7526b2158d657964825ff71..13859eac6be06af4ebf2ba7aabeda8e01a1f8174 100644
(file)
--- a/
Cython/Compiler/AutoDocTransforms.py
+++ b/
Cython/Compiler/AutoDocTransforms.py
@@
-20,7
+20,7
@@
class EmbedSignature(CythonTransform):
try:
denv = self.denv # XXX
ctval = default_val.compile_time_value(self.denv)
- repr_val =
'%r' % ctval
+ repr_val =
repr(ctval)
if isinstance(default_val, ExprNodes.UnicodeNode):
if repr_val[:1] != 'u':
return u'u%s' % repr_val
@@
-28,8
+28,8
@@
class EmbedSignature(CythonTransform):
if repr_val[:1] != 'b':
return u'b%s' % repr_val
elif isinstance(default_val, ExprNodes.StringNode):
- if repr_val[:1] in
('u', 'b')
:
- repr_val[1:]
+ if repr_val[:1] in
'ub'
:
+ re
turn re
pr_val[1:]
return repr_val
except Exception:
try: