On the Usage of “Pythonic” Idioms in Python Programs
Developers discuss software architecture and concrete source code implementations on a regular basis, be it on question-answering sites, online chats, mailing lists or face to face. In many cases, there is more than one way of solving a programming task. Which way is best may be decided based on case-specific circumstances and constraints, but also based on convention. Having strong conventions, and a common vocabulary to express them, simplifies communication and strengthens common understanding of software development problems and their solutions. While many programming ecosystems have a common vocabulary, Python’s relationship to conventions and common language is a particularly pronounced. The “Zen of Python”, a famous set of high-level coding conventions authored by Tim Peters, states “There should be one, and preferably only one, obvious way to do it”. This ‘one way to do it’ is often referred to as the ‘Pythonic’ way: the ideal solution to a particular problem. Few other programming languages have coined a unique term to label the quality of craftsmanship gone into a software artifact. In this paper, we explore how Python developers understand the term ‘Pythonic’ by means of structured interviews, build a catalogue of ‘pythonic idioms’ gathered from literature, and conjecture on the effects of having a language-specific term for quality code, considering the potential it could hold for other programming languages and ecosystems. We find that while the term means different things to novice versus experienced Python developers, it encompasses not only concrete implementation, but a way of thinking - a culture - in general.
Wed 7 NovDisplayed time zone: Guadalajara, Mexico City, Monterrey change
10:30 - 12:00 | Usability and ReusabilityOnward! Papers at The Loft Chair(s): Elisa Gonzalez Boix Vrije Universiteit Brussel | ||
10:30 30mTalk | On the Usage of “Pythonic” Idioms in Python Programs Onward! Papers Carol V. Alexandru University of Zurich, José J. Merchante Universidad Rey Juan Carlos, Sebastiano Panichella Zurich University of Applied Science/University of Zurich, Sebastian Proksch University of Zurich, Harald Gall University of Zurich, Gregorio Robles Universidad Rey Juan Carlos | ||
11:00 30mTalk | Inference and Regeneration of Programs that Store and Retrieve Data Onward! Papers Martin C. Rinard Massachusetts Institute of Technology, Jiasi Shen Massachusetts Institute of Technology, Varun Mangalick MIT |