mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 00:22:00 +00:00
Removed dependency on "six" package.
This commit is contained in:
parent
cc4b9eda0e
commit
511dc90d34
@ -1,11 +1,16 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import six
|
|
||||||
import sys, pydoc
|
import sys, pydoc
|
||||||
sys.path.append('.')
|
sys.path.append('.')
|
||||||
|
|
||||||
from example import Example2
|
from example import Example2
|
||||||
|
|
||||||
|
def u(string):
|
||||||
|
if sys.version_info[0]<3:
|
||||||
|
return unicode(string)
|
||||||
|
else:
|
||||||
|
return string
|
||||||
|
|
||||||
Example2.value = 15
|
Example2.value = 15
|
||||||
print(Example2.value)
|
print(Example2.value)
|
||||||
print(Example2.value2)
|
print(Example2.value2)
|
||||||
@ -31,11 +36,11 @@ dict_result['key2'] = 'value2'
|
|||||||
instance.print_dict_2(dict_result)
|
instance.print_dict_2(dict_result)
|
||||||
|
|
||||||
set_result = instance.get_set()
|
set_result = instance.get_set()
|
||||||
set_result.add(six.u('key3'))
|
set_result.add(u('key3'))
|
||||||
instance.print_set(set_result)
|
instance.print_set(set_result)
|
||||||
|
|
||||||
set_result = instance.get_set2()
|
set_result = instance.get_set2()
|
||||||
set_result.add(six.u('key3'))
|
set_result.add(u('key3'))
|
||||||
instance.print_set_2(set_result)
|
instance.print_set_2(set_result)
|
||||||
|
|
||||||
list_result = instance.get_list()
|
list_result = instance.get_list()
|
||||||
|
Loading…
Reference in New Issue
Block a user