Vorsichtsmaßnahmen bei Verwendung von sechs in einem Python-Skript, das in der Umgebung ausgeführt wird, in der Python 2.5 ausgeführt wird.
In der offiziellen Dokumentation finden Sie sechs Informationen. Six: Python 2 and 3 Compatibility Library — six 1.10.0 documentation
Six provides simple utilities for wrapping over differences between Python 2 and Python 3. It is intended to support codebases that work on both Python 2 and 3 without modification. six consists of only one Python file, so it is painless to copy into a project.
Offizielles Repository (gutworth / six - Bitbucket) Derzeit (2015/12) ist die neueste Version 1.10.0
Die japanische Übersetzung der offiziellen Seite ist derzeit bis 1.9.0. Sechs: Python 2- und 3-Kompatibilitätsbibliothek - sechs 1.9.0-Dokumentation
Wenn die Möglichkeit besteht, dass es in der Python 2.5-Umgebung funktioniert, verwenden Sie sechs 1.8.0.
Python 2.5 wird in 1.10.0 nicht mehr unterstützt.
six 1.10.0 : Python Package Index
Six supports every Python version since 2.6. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)
Python 2.5 wird in 1.9.0 unterstützt.
six 1.9.0 : Python Package Index
Six supports every Python version since 2.5. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)
Ich verwende jedoch operator.methodcaller, das in Python 2.5 nicht funktioniert. Mit Blick auf das Quellendiff wurde es geändert, um operator.methodcaller in 1.8.0-> 1.9.0 zu verwenden.
Wenn Sie also auch Python 2.5 unterstützen, verwenden wir sechs 1.8.0.
Recommended Posts