Content deleted Content added
Yemma gretha (talk | contribs) mNo edit summary |
BlankAWiki (talk | contribs) m Added minor links |
||
Line 50:
* Now is better than never.
* Although never is often better than {{em|right}} now.{{efn|In the interpreter easter egg, this is written as "Although never is often better than *right* now." This follows a longstanding convention of [[Plain text|plain-text]] communication — in which common formatting features are often impossible — where [[Emphasis (typography)|emphasis]] is represented with asterisks.}}
* If the [[Implementation|implementation]] is hard to [[Rubber_duck_debugging|explain]], it's a bad idea.
* If the implementation is easy to explain, it may be a good idea.
* [[Namespaces]] are one honking great idea – let's do more of those!
Line 71:
== In practice ==
Since the release of the Zen of Python, there has been research done on its effectiveness and actual use among [[Developer (software)|developers]]. Despite the difference in [[Interpretation (logic)|interpretation]] between beginners and [[Experience|experienced]] Python [[Programmer|programmers]], interviews among 13 Python programmers of varying skill show that the Zen of Python "positively influences the way developers write and talk about code".<ref name=":0">{{Cite book |last1=Alexandru |first1=Carol V. |last2=Merchante |first2=José J. |last3=Panichella |first3=Sebastiano |last4=Proksch |first4=Sebastian |last5=Gall |first5=Harald C. |last6=Robles |first6=Gregorio |chapter=On the usage of pythonic idioms |date=2018-10-24 |title=Proceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software |chapter-url=https://doi.org/10.1145/3276954.3276960 |series=Onward! 2018 |___location=New York, NY, USA |publisher=Association for Computing Machinery |pages=1–11 |doi=10.1145/3276954.3276960 |isbn=978-1-4503-6031-9 |s2cid=53057358 |oclc=1362712424 |url=https://www.zora.uzh.ch/id/eprint/156901/1/paper.pdf |chapter-url-access=registration |archive-url=https://doi.org/10.5167/uzh-156901 |archive-date=2018-10-03 }}</ref> Researchers extended this [[case study]] to explore the use of Python [[Idiom|idioms]] on [[GitHub]] repositories, and found that the usage of "Pythonic idioms"{{Efn|A list of their Pythonic idioms can be found here https://slimshadyiam.github.io/ZenYourPython/}} increased over time.<ref>{{Cite book |last1=Farooq |first1=Aamir |last2=Zaytsev |first2=Vadim |chapter=There is more than one way to zen your Python |date=2021-11-22 |title=Proceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering |chapter-url=https://dl.acm.org/doi/10.1145/3486608.3486909 |series=SLE 2021 |___location=New York, NY, USA |publisher=Association for Computing Machinery |pages=68–82 |doi=10.1145/3486608.3486909 |isbn=978-1-4503-9111-5}}</ref> Writing Python code that aligns with the Zen of Python may save [[Computer memory|memory]] and [[Execution (computing)|run time]] of Python programs.<ref>{{Cite book |last1=Leelaprute |first1=Pattara |last2=Chinthanet |first2=Bodin |last3=Wattanakriengkrai |first3=Supatsara |last4=Kula |first4=Raula Gaikovina |last5=Jaisri |first5=Pongchai |last6=Ishio |first6=Takashi |chapter=Does coding in Pythonic zen peak performance?: Preliminary experiments of nine Pythonic idioms at scale |date=2022-10-20 |title=Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension |chapter-url=https://doi.org/10.1145/3524610.3527879 |series=ICPC '22 |___location=New York, NY, USA |publisher=Association for Computing Machinery |pages=575–579 |doi=10.1145/3524610.3527879 |isbn=978-1-4503-9298-3}}</ref> The [[desire]] to write in Pythonic code has led to [[Code refactoring|refactoring]] tools to help programmers achieve this goal.<ref>{{Citation |last1=Zhang |first1=Zejun |title=Making Python Code Idiomatic by Automatic Refactoring Non-Idiomatic Python Code with Pythonic Idioms |date=2022-07-12 |arxiv=2207.05613 |last2=Xing |first2=Zhenchang |last3=Xia |first3=Xin |last4=Xu |first4=Xiwei |last5=Zhu |first5=Liming}}</ref><ref>{{Citation |last1=Phan-udom |first1=Purit |title=Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects |date=2020-09-05 |arxiv=2009.03302 |last2=Wattanakul |first2=Naruedon |last3=Sakulniwat |first3=Tattiya |last4=Ragkhitwetsagul |first4=Chaiyong |last5=Sunetnanta |first5=Thanwadee |last6=Choetkiertikul |first6=Morakot |last7=Kula |first7=Raula Gaikovina}}</ref>
== See also ==
|