文档介绍:IwasrecentlylookingatthesourceofawxPython-basedGUIapplication,,notcountingthelibrariesused().ThecodewaswrittenbyJavadeveloperswhoarerelativelynewtoPython,anditsuffersfromsomeperformanceissues(likea30-secondstartuptime).Inexaminingthecode,IfoundthattheyhaddonelotsofthingsthatmakesenseinJava,"PythonisslowerthanJava",plishthesamegoalsinPython,thatwouldn'tevenbepossibleinJava. So,thesadthingisthatthesepoorfolksworkedmuch,muchharderthantheyneededto,inordertoproducemuchmorecodethantheyneededtowrite,: ,itresultsinmoreorlessthesameeffect,butthegoalofaclassmethodisactuallytodosomethingthat'susuallynotevenpossibleinJava(likeinheritinganon-defaultconstructor).TheidiomatictranslationofaJavastaticmethodisusuallyamodule-levelfunction,notaclassmethodorstaticmethod.(Andstaticfinalfieldsshouldtranslatetomodule-levelconstants.) Thisisn'tmuchofaperformanceissue,butaPythonprogrammerwhohastoworkwithJava-. Oh,'tcomeforfree,,piler,soatru