Merge pull request #2426 from Epsirom/issue-2339

Fix "bytes aketrans" issues in Python>=3.1
pull/2429/head^2
Kim Kulling 2019-05-01 23:23:45 +02:00 committed by GitHub
commit 3e57510af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ def _is_init_type(obj):
return False
tname = obj.__class__.__name__
return not (tname[:2] == 'c_' or tname == 'Structure' \
or tname == 'POINTER') and not isinstance(obj,int)
or tname == 'POINTER') and not isinstance(obj, (int, str, bytes))
def _init(self, target = None, parent = None):
"""