{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,25]],"date-time":"2026-02-25T18:02:43Z","timestamp":1772042563038,"version":"3.50.1"},"publisher-location":"New York, NY, USA","reference-count":64,"publisher":"ACM","license":[{"start":{"date-parts":[[2022,11,7]],"date-time":"2022-11-07T00:00:00Z","timestamp":1667779200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"name":"Data61-ANU Collaborative Research Project","award":["CO19314"],"award-info":[{"award-number":["CO19314"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":[],"published-print":{"date-parts":[[2022,11,7]]},"DOI":"10.1145\/3540250.3549143","type":"proceedings-article","created":{"date-parts":[[2022,11,9]],"date-time":"2022-11-09T20:46:22Z","timestamp":1668026782000},"page":"696-708","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":33,"title":["Making Python code idiomatic by automatic refactoring non-idiomatic Python code with pythonic idioms"],"prefix":"10.1145","author":[{"given":"Zejun","family":"Zhang","sequence":"first","affiliation":[{"name":"Australian National University, Australia"}]},{"given":"Zhenchang","family":"Xing","sequence":"additional","affiliation":[{"name":"CSIRO\u2019s Data61, Australia \/ Australian National University, Australia"}]},{"given":"Xin","family":"Xia","sequence":"additional","affiliation":[{"name":"Huawei, China"}]},{"given":"Xiwei","family":"Xu","sequence":"additional","affiliation":[{"name":"CSIRO\u2019s Data61, Australia"}]},{"given":"Liming","family":"Zhu","sequence":"additional","affiliation":[{"name":"CSIRO\u2019s Data61, Australia"}]}],"member":"320","published-online":{"date-parts":[[2022,11,9]]},"reference":[{"key":"e_1_3_2_1_1_1","unstructured":"2021. Pylint. https:\/\/pylint.org\/ \t\t\t\t  2021. Pylint. https:\/\/pylint.org\/"},{"key":"e_1_3_2_1_2_1","unstructured":"2022. Assign with Multiple Targets on loginradius. https:\/\/www.loginradius.com\/blog\/async\/speed-up-python-code\/ \t\t\t\t  2022. Assign with Multiple Targets on loginradius. https:\/\/www.loginradius.com\/blog\/async\/speed-up-python-code\/"},{"key":"e_1_3_2_1_3_1","unstructured":"2022. Assign with Multiple Targets on Medium. https:\/\/medium.com\/geekculture\/3-easy-ways-to-instantly-make-your-python-program-faster-e599e920ea28 \t\t\t\t  2022. Assign with Multiple Targets on Medium. https:\/\/medium.com\/geekculture\/3-easy-ways-to-instantly-make-your-python-program-faster-e599e920ea28"},{"key":"e_1_3_2_1_4_1","unstructured":"2022. Assign with Multiple Targets on Stack Overflow. https:\/\/stackoverflow.com\/questions\/22278695\/python-multiple-assignment-vs-individual-assignment-speed \t\t\t\t  2022. Assign with Multiple Targets on Stack Overflow. https:\/\/stackoverflow.com\/questions\/22278695\/python-multiple-assignment-vs-individual-assignment-speed"},{"key":"e_1_3_2_1_5_1","unstructured":"2022. Chain Comparison on Stack Overflow. https:\/\/stackoverflow.com\/questions\/48375753\/why-are-chained-operator-expressions-slower-than-their-expanded-equivalent \t\t\t\t  2022. Chain Comparison on Stack Overflow. https:\/\/stackoverflow.com\/questions\/48375753\/why-are-chained-operator-expressions-slower-than-their-expanded-equivalent"},{"key":"e_1_3_2_1_6_1","unstructured":"2022. Chain Comparison on Wiki. https:\/\/wiki.python.org\/moin\/PythonSpeed \t\t\t\t  2022. Chain Comparison on Wiki. https:\/\/wiki.python.org\/moin\/PythonSpeed"},{"key":"e_1_3_2_1_7_1","unstructured":"2022. Dict Comprehension. https:\/\/stackoverflow.com\/questions\/52542742\/why-is-this-loop-faster-than-a-dictionary-comprehension-for-creating-a-dictionar \t\t\t\t  2022. Dict Comprehension. https:\/\/stackoverflow.com\/questions\/52542742\/why-is-this-loop-faster-than-a-dictionary-comprehension-for-creating-a-dictionar"},{"key":"e_1_3_2_1_8_1","unstructured":"2022. For Multiple Targets on Stack Overflow. https:\/\/stackoverflow.com\/questions\/13024416\/how-come-unpacking-is-faster-than-accessing-by-index \t\t\t\t  2022. For Multiple Targets on Stack Overflow. https:\/\/stackoverflow.com\/questions\/13024416\/how-come-unpacking-is-faster-than-accessing-by-index"},{"key":"e_1_3_2_1_9_1","unstructured":"2022. For Multiple Targets on Stack Overflow. https:\/\/stackoverflow.com\/questions\/23039485\/for-loop-item-unpacking \t\t\t\t  2022. For Multiple Targets on Stack Overflow. https:\/\/stackoverflow.com\/questions\/23039485\/for-loop-item-unpacking"},{"key":"e_1_3_2_1_10_1","unstructured":"2022. List comprehension is 10X faster than loops. https:\/\/innovationyourself.com\/list-comprehension-in-python\/ \t\t\t\t  2022. List comprehension is 10X faster than loops. https:\/\/innovationyourself.com\/list-comprehension-in-python\/"},{"key":"e_1_3_2_1_11_1","unstructured":"2022. List Comprehension on Stack Overflow. https:\/\/stackoverflow.com\/questions\/30245397\/why-is-a-list-comprehension-so-much-faster-than-appending-to-a-list \t\t\t\t  2022. List Comprehension on Stack Overflow. https:\/\/stackoverflow.com\/questions\/30245397\/why-is-a-list-comprehension-so-much-faster-than-appending-to-a-list"},{"key":"e_1_3_2_1_12_1","unstructured":"2022. Loop Else. https:\/\/stackoverflow.com\/questions\/13069402\/efficient-implementation-for-python-for-else-loop-in-java \t\t\t\t  2022. Loop Else. https:\/\/stackoverflow.com\/questions\/13069402\/efficient-implementation-for-python-for-else-loop-in-java"},{"key":"e_1_3_2_1_13_1","unstructured":"2022. Medium. https:\/\/medium.com\/ \t\t\t\t  2022. Medium. https:\/\/medium.com\/"},{"key":"e_1_3_2_1_14_1","unstructured":"2022. PEP 202-List comprehension. https:\/\/peps.python.org\/pep-0202\/ \t\t\t\t  2022. PEP 202-List comprehension. https:\/\/peps.python.org\/pep-0202\/"},{"key":"e_1_3_2_1_15_1","unstructured":"2022. PEP 274-Dict comprehension. https:\/\/peps.python.org\/pep-0274\/ \t\t\t\t  2022. PEP 274-Dict comprehension. https:\/\/peps.python.org\/pep-0274\/"},{"key":"e_1_3_2_1_16_1","unstructured":"2022. PEP 448-Additional Unpacking Generalizations. https:\/\/peps.python.org\/pep-0448 \t\t\t\t  2022. PEP 448-Additional Unpacking Generalizations. https:\/\/peps.python.org\/pep-0448"},{"key":"e_1_3_2_1_17_1","unstructured":"2022. Programming Idioms. https:\/\/programming-idioms.org\/ \t\t\t\t  2022. Programming Idioms. https:\/\/programming-idioms.org\/"},{"key":"e_1_3_2_1_18_1","unstructured":"2022. Python Abstract Grammar. https:\/\/docs.python.org\/3\/library\/ast.html \t\t\t\t  2022. Python Abstract Grammar. https:\/\/docs.python.org\/3\/library\/ast.html"},{"key":"e_1_3_2_1_19_1","unstructured":"2022. Python Chain Comparison. https:\/\/docs.python.org\/3\/reference\/expressions.html##comparisons \t\t\t\t  2022. Python Chain Comparison. https:\/\/docs.python.org\/3\/reference\/expressions.html##comparisons"},{"key":"e_1_3_2_1_20_1","unstructured":"2022. Set Comprehension. https:\/\/appdividend.com\/2020\/12\/03\/python-set-comprehension\/ \t\t\t\t  2022. Set Comprehension. https:\/\/appdividend.com\/2020\/12\/03\/python-set-comprehension\/"},{"key":"e_1_3_2_1_21_1","unstructured":"2022. Stack Overflow. https:\/\/stackoverflow.com\/ \t\t\t\t  2022. Stack Overflow. https:\/\/stackoverflow.com\/"},{"key":"e_1_3_2_1_22_1","unstructured":"2022. Star in Call on Stack Overflow. https:\/\/stackoverflow.com\/questions\/2921847\/what-does-the-star-and-doublestar-operator-mean-in-a-function-call \t\t\t\t  2022. Star in Call on Stack Overflow. https:\/\/stackoverflow.com\/questions\/2921847\/what-does-the-star-and-doublestar-operator-mean-in-a-function-call"},{"key":"e_1_3_2_1_23_1","unstructured":"2022. timeit. https:\/\/docs.python.org\/3\/library\/timeit.html \t\t\t\t  2022. timeit. https:\/\/docs.python.org\/3\/library\/timeit.html"},{"key":"e_1_3_2_1_24_1","unstructured":"2022. Truth Value Test. https:\/\/stackoverflow.com\/questions\/39983695\/what-is-truthy-and-falsy-how-is-it-different-from-true-and-false \t\t\t\t  2022. Truth Value Test. https:\/\/stackoverflow.com\/questions\/39983695\/what-is-truthy-and-falsy-how-is-it-different-from-true-and-false"},{"key":"e_1_3_2_1_25_1","unstructured":"2022. Truth Value Test. https:\/\/stackoverflow.com\/questions\/53513\/how-do-i-check-if-a-list-is-empty \t\t\t\t  2022. Truth Value Test. https:\/\/stackoverflow.com\/questions\/53513\/how-do-i-check-if-a-list-is-empty"},{"key":"e_1_3_2_1_26_1","unstructured":"2022. Truth Value Test on Python Documentation. https:\/\/docs.python.org\/3\/library\/stdtypes.html##truth-value-testing \t\t\t\t  2022. Truth Value Test on Python Documentation. https:\/\/docs.python.org\/3\/library\/stdtypes.html##truth-value-testing"},{"key":"e_1_3_2_1_27_1","unstructured":"2022. Unit testing framework. https:\/\/docs.python.org\/3\/library\/unittest.html \t\t\t\t  2022. Unit testing framework. https:\/\/docs.python.org\/3\/library\/unittest.html"},{"key":"e_1_3_2_1_28_1","unstructured":"2022. Writing Fast Python. https:\/\/switowski.com\/blog\/checking-for-true-or-false \t\t\t\t  2022. Writing Fast Python. https:\/\/switowski.com\/blog\/checking-for-true-or-false"},{"key":"e_1_3_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276954.3276960"},{"key":"e_1_3_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2018.2832048"},{"key":"e_1_3_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/2635868.2635901"},{"key":"e_1_3_2_1_32_1","volume-title":"Kayak: Safe semantic refactoring to java streams. arXiv preprint arXiv:1712.07388.","author":"David Cristina","year":"2017","unstructured":"Cristina David , Pascal Kesseli , and Daniel Kroening . 2017 . Kayak: Safe semantic refactoring to java streams. arXiv preprint arXiv:1712.07388. Cristina David, Pascal Kesseli, and Daniel Kroening. 2017. Kayak: Safe semantic refactoring to java streams. arXiv preprint arXiv:1712.07388."},{"key":"e_1_3_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/354222.353183"},{"key":"e_1_3_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1007\/11785477_24"},{"key":"e_1_3_2_1_35_1","volume-title":"Discovering Repetitive Code Changes in Python ML Systems. In International Conference on Software Engineering (ICSE\u201922)","author":"Dilhara Malinda","year":"2022","unstructured":"Malinda Dilhara , Ameya Ketkar , Nikhith Sannidhi , and Danny Dig . 2022 . Discovering Repetitive Code Changes in Python ML Systems. In International Conference on Software Engineering (ICSE\u201922) . To appear. Malinda Dilhara, Ameya Ketkar, Nikhith Sannidhi, and Danny Dig. 2022. Discovering Repetitive Code Changes in Python ML Systems. In International Conference on Software Engineering (ICSE\u201922). To appear."},{"key":"e_1_3_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3486608.3486909"},{"key":"e_1_3_2_1_37_1","volume-title":"Refactoring: improving the design of existing code","author":"Fowler Martin","unstructured":"Martin Fowler . 2018. Refactoring: improving the design of existing code . Addison-Wesley Professional . Martin Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional."},{"key":"e_1_3_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2013.6606699"},{"key":"e_1_3_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/3468264.3468553"},{"key":"e_1_3_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2005.28"},{"key":"e_1_3_2_1_41_1","unstructured":"Raymond Hettinger. 2013. Transforming code into beautiful idiomatic Python. https:\/\/www.youtube.com\/watch?v=OSGv2VnC0go \t\t\t\t  Raymond Hettinger. 2013. Transforming code into beautiful idiomatic Python. https:\/\/www.youtube.com\/watch?v=OSGv2VnC0go"},{"key":"e_1_3_2_1_42_1","volume-title":"Advanced Guide to Python 3 Programming","author":"Hunt John","unstructured":"John Hunt . 2019. PyTest Testing Framework . In Advanced Guide to Python 3 Programming . Springer , 175\u2013186. John Hunt. 2019. PyTest Testing Framework. In Advanced Guide to Python 3 Programming. Springer, 175\u2013186."},{"key":"e_1_3_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/1882291.1882353"},{"key":"e_1_3_2_1_44_1","unstructured":"Jeff Knupp. 2013. Writing Idiomatic Python 3.3. Jeff Knupp. \t\t\t\t  Jeff Knupp. 2013. Writing Idiomatic Python 3.3. Jeff Knupp."},{"key":"e_1_3_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2019.00082"},{"key":"e_1_3_2_1_46_1","volume-title":"Proceedings of the Seminar Series on Advanced Techniques and Tools for Software Evolution. 1\u20133.","author":"Merchante Jos\u00e9 Javier","year":"2017","unstructured":"Jos\u00e9 Javier Merchante and Gregorio Robles . 2017 . From Python to Pythonic: Searching for Python idioms in GitHub . In Proceedings of the Seminar Series on Advanced Techniques and Tools for Software Evolution. 1\u20133. Jos\u00e9 Javier Merchante and Gregorio Robles. 2017. From Python to Pythonic: Searching for Python idioms in GitHub. In Proceedings of the Seminar Series on Advanced Techniques and Tools for Software Evolution. 1\u20133."},{"key":"e_1_3_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/3494885.3494910"},{"key":"e_1_3_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-39038-8_23"},{"key":"e_1_3_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/2932631"},{"key":"e_1_3_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/3395363.3397354"},{"key":"e_1_3_2_1_51_1","volume-title":"Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects. In 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). 806\u2013809","author":"Purit","year":"2020","unstructured":"Purit Phan-udom, Naruedon Wattanakul , Tattiya Sakulniwat , Chaiyong Ragkhitwetsagul , Thanwadee Sunetnanta , Morakot Choetkiertikul , and Raula Gaikovina Kula . 2020 . Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects. In 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). 806\u2013809 . Purit Phan-udom, Naruedon Wattanakul, Tattiya Sakulniwat, Chaiyong Ragkhitwetsagul, Thanwadee Sunetnanta, Morakot Choetkiertikul, and Raula Gaikovina Kula. 2020. Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects. In 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). 806\u2013809."},{"key":"e_1_3_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2010.5609577"},{"key":"e_1_3_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/2660193.2660228"},{"key":"e_1_3_2_1_54_1","volume-title":"The Hitchhiker\u2019s guide to Python: best practices for development. \" O\u2019Reilly Media","author":"Reitz Kenneth","unstructured":"Kenneth Reitz and Tanya Schlusser . 2016. The Hitchhiker\u2019s guide to Python: best practices for development. \" O\u2019Reilly Media , Inc .\". Kenneth Reitz and Tanya Schlusser. 2016. The Hitchhiker\u2019s guide to Python: best practices for development. \" O\u2019Reilly Media, Inc.\"."},{"key":"e_1_3_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1109\/MSR.2017.14"},{"key":"e_1_3_2_1_56_1","doi-asserted-by":"crossref","unstructured":"Aishwarya Sivaraman Rui Abreu Andrew Scott Tobi Akomolede and Satish Chandra. 2021. Mining Idioms in the Wild. arXiv preprint arXiv:2107.06402. \t\t\t\t  Aishwarya Sivaraman Rui Abreu Andrew Scott Tobi Akomolede and Satish Chandra. 2021. Mining Idioms in the Wild. arXiv preprint arXiv:2107.06402.","DOI":"10.1145\/3510457.3513046"},{"key":"e_1_3_2_1_57_1","volume-title":"Effective python: 90 specific ways to write better python","author":"Slatkin Brett","unstructured":"Brett Slatkin . 2019. Effective python: 90 specific ways to write better python . Addison-Wesley Professional . Brett Slatkin. 2019. Effective python: 90 specific ways to write better python. Addison-Wesley Professional."},{"key":"e_1_3_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180206"},{"key":"e_1_3_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.14"},{"key":"e_1_3_2_1_60_1","unstructured":"Guido Van Rossum. 2007. Python Programming language.. In USENIX annual technical conference. 41 1\u201336. \t\t\t\t  Guido Van Rossum. 2007. Python Programming language.. In USENIX annual technical conference. 41 1\u201336."},{"key":"e_1_3_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/3368089.3409735"},{"key":"e_1_3_2_1_62_1","volume-title":"21st IEEE\/ACM international conference on automated software engineering (ASE\u201906)","author":"Peter","unstructured":"Peter Wei\u00df gerber and Stephan Diehl. 2006. Identifying refactorings from source-code changes . In 21st IEEE\/ACM international conference on automated software engineering (ASE\u201906) . 231\u2013240. Peter Wei\u00df gerber and Stephan Diehl. 2006. Identifying refactorings from source-code changes. In 21st IEEE\/ACM international conference on automated software engineering (ASE\u201906). 231\u2013240."},{"key":"e_1_3_2_1_63_1","doi-asserted-by":"publisher","DOI":"10.1109\/WCRE.2006.48"},{"key":"e_1_3_2_1_64_1","article-title":"Chatbot4qr: Interactive query refinement for technical question retrieval","author":"Zhang Neng","year":"2020","unstructured":"Neng Zhang , Qiao Huang , Xin Xia , Ying Zou , David Lo , and Zhenchang Xing . 2020 . Chatbot4qr: Interactive query refinement for technical question retrieval . IEEE Transactions on Software Engineering. Neng Zhang, Qiao Huang, Xin Xia, Ying Zou, David Lo, and Zhenchang Xing. 2020. Chatbot4qr: Interactive query refinement for technical question retrieval. IEEE Transactions on Software Engineering.","journal-title":"IEEE Transactions on Software Engineering."}],"event":{"name":"ESEC\/FSE '22: 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering","location":"Singapore Singapore","acronym":"ESEC\/FSE '22","sponsor":["SIGSOFT ACM Special Interest Group on Software Engineering","NUS NUS"]},"container-title":["Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering"],"original-title":[],"link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3540250.3549143","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3540250.3549143","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T17:51:02Z","timestamp":1750182662000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3540250.3549143"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,11,7]]},"references-count":64,"alternative-id":["10.1145\/3540250.3549143","10.1145\/3540250"],"URL":"https:\/\/doi.org\/10.1145\/3540250.3549143","relation":{},"subject":[],"published":{"date-parts":[[2022,11,7]]},"assertion":[{"value":"2022-11-09","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}