DiscovercleanwaystowritecodethatwillrunonbothPython2and3.Thisbookistutorial-orientedwithdetailedexamplesofhowtoconvertexistingPython2-compatiblecodetocodethatwillrunreliablyonbothPython2and3.AlthoughPython3isconsideredthefutureofPython,Python2.xwillbemaintainedforseveralmoreyears,alongsidePython3,whichisnotbackwardscompatible.Forthosewhoneedtosupportbothversions,thisbookguidesyouthroughtheprocess.Python2and3CompatibilityexplainsthesyntacticaldifferencesbetweenPython2and3,andhowtousePythonpackagesPython-FutureandSixtoimplementneutralcompatibility.Developersworkingoneithersmall,medium,orlargeprojectswillappreciatetheauthor'sclearexplanations,detailedexamples,andcleantechniquestohelpthemextendsupportforbothversionstotheirexistingPython2-compatibleprojects.WhatYou'llLearnUnderstandthesyntacticaldifferencesbetweenPython2and3UsetheSixandFutureLibrariesReviewthenewfeaturesinPython3ChoosewhichPythonversionstosupportwhendoingneutralsupportDecideonwhethertoportorprovidesupportforbothversionsWhoThisBookIsForProfessionalPythondevelopersandenthusiaststhatwanttoimplementPython3supportfortheirexistingPython2compatiblecode.TableofContentsChapter1:PrintingandBacktickreprChapter2:NumbersChapter3:SettingMetaclassesChapter4:StringsandBytesChapter5:PackageImportsChapter6:ExceptionsChapter7:HTMLProcessingChapter8:WorkingwithFilesChapter9:CustomBehaviorofClassesChapter10:CollectionsandIteratorsChapter11:MoreBuilt-insChapter12:StandardLibraryModules
1