Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn how to support both Python 2 and Python 3 with the same codebase in this 40-minute conference talk from EuroPython 2014. Explore the main challenges of supporting Python 3 in existing Python 2 libraries and discover best practices for maintaining compatibility across versions. Understand the key differences between Python 2 and 3, including changes to print functions, iterator behavior, string handling, and file operations. Gain insights on starting with good test coverage, using 2to3 for automatic conversions, and designing APIs that work seamlessly in both environments. Discover strategies for minimizing version-specific code and leveraging compatibility libraries. Walk away with practical tips and resources to confidently update your Python libraries for cross-version support.
Syllabus
Stefan Schwarzer - Support Python 2 and 3 with the same code
Taught by
EuroPython Conference