Try to convert unicode objects to str if they're ascii, rather than asserting they're already str objects.

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-04-23 11:11:24 +01:00
1 parent 45a4ee5d7e
commit f03583993e
3 files changed
+24 -5

No files matched your search

+1 -1
View File
@@ -909,7 +909,7 @@ public:
name -- optional name of the class method as it will appear
from Python side
"""
assert name is None or isinstance(name, str)
name = utils.ascii(name)
if isinstance(method, CppMethod):
if name is None: