python import six if six.PY2: pass elif six.PY3: pass python import six python import six value = 10 if six.PY2: pass elif six.PY3: pass python import six class Parent(object): def __init__(self): self.name = "John" class Child(object): pass parent = Parent() child = Child() six.add_metaclass(six.copy_properties, Parent, Child) python import six with six.moves.builtins.open("file.txt", "rb") as file: data = file.read() print(data) pip install six


上一篇:
下一篇:
切换中文