2026-03-22 –, Pardo Hall (Secondary Hall)
Python's elegant simplicity often hides a powerful system of internal conventions, many revolving around the humble underscore (). This talk, "Life Under the : A Guide to Python's Internal Conventions," demystifies the rules and mechanisms behind the scenes of Python's most powerful features. We will explore the single underscore (_) for stylistic clarity, the purpose of name mangling using double underscores (), and the practical application of "Dunder Methods" (e.g., __init, add) for customizing object behavior and implementing language protocols. Finally, we will dive into Python’s attribute access logic and the sophisticated mechanics of Data and Non-Data Descriptors, the building blocks for features like @property, classmethod, and staticmethod. Attendees will leave with a clearer understanding of how to read and write more idiomatic, maintainable, and powerful Python code.
Talk Description
Take a deep dive into the conventions that make Python a flexible and robust language. This session is a comprehensive guide to mastering the many roles of the underscore and its variations in Python development.
Key Takeaways:
- Underscore Conventions: Learn the practical uses of the single underscore () for accessing previous values in the interactive shell, enhancing big number readability, and acting as a throwaway variable in loops or unpacking.
- Variable Naming and Privacy: Understand the differences between the three main variable conventions: the weak-private indicator (_var), the keyword-avoidance suffix (var), and the stronger privacy enforcement of name mangling (var).
- Dunder Methods (Magic Methods): Unlock the power of double-underscore methods to customize fundamental Python operations. We will examine core dunders like __init, str, add (for operator overloading), len, iter (for collection protocols), and call.
- Advanced Dunder Features: Explore powerful features such as slots for memory optimization, dict, and the utility of missing in specialized dictionary subclasses.
- Descriptors Explained: Master the concept of Descriptors—the mechanism behind properties, class methods, and static methods. We will break down the get, set, and delete descriptor methods and distinguish between Data and Non-Data Descriptors, detailing how they take precedence during Python's attribute access logic.
This talk is ideal for intermediate to advanced Python developers looking to move beyond surface-level syntax and understand the core language mechanisms.
Neil Riego, is a Software Engineer, excels in crafting innovative solutions. Currently serving as a Tech Lead at Control Flow Labs. Neil's diverse portfolio includes roles as a Career Coach at Kadakareer and a proud GDSC Alumni.
Neil's dedication to leveraging technology for community betterment is evident through his leadership roles as the Vice President for Technology at DEVCON Manila and an AWS User Group Meetup Lead. Additionally, he actively participates as a volunteer at Python Philippines and Google Developer Groups Cloud Manila Events, fostering connections within the tech community.
