PyCon Portugal 2025

Python Power Tools: Hands-On from Decorators to Context Managers
2025-07-26 , Workshops 1

Let’s make your functions smarter with decorators, simplify operations using lambdas, save memory with generators, and handle resources like a pro with context managers. We’ll mix clear explanations with hands-on practice - so you can write code that’s cleaner, faster, and feels Pythonic.


This hands-on tutorial is for Python developers who want to learn the language’s advanced features in a clear and engaging way. In this session, we’ll explore decorators, lambda functions, generators, and context managers, and learn how these tools can help you write cleaner, more efficient, and Pythonic code.

With both theoretical explanations and hands-on collaborative activities, attendees will understand how they can apply these concepts to solve problems and optimise their own Python code. We’ll start by understanding decorators to enhance your functions, then move on to lambda functions for concise and flexible operations, explore generators for efficient memory usage and lazy evaluation, and finally dive into context managers for robust resource management.


Audience Level:

Beginner

What are the main topics of your talk?:

generators, decorators, context managers

Neeraj is a polyglot developer passionate about bridging different technologies. Over the years, he has worked on a variety of full-stack software and data-science applications, computational arts, and quantitative finance projects, embracing the challenge of creating innovative tools and applications. As an active Python community member, he has shared his expertise through talks and workshops at numerous conferences and meet-ups.