Pass by Reference in Python: Best Practices
Howard Francis
1:17:36
Description
After gaining some familiarity with Python, you may notice cases in which your functions don’t modify arguments in place as you might expect, especially if you’re familiar with other programming languages. Some languages handle function arguments as references to existing variables, which is known as pass by reference. Other languages handle them as independent values, an approach known as pass by value.
If you’re an intermediate Python programmer who wishes to understand Python’s peculiar way of handling function arguments, then this course is for you. You’ll implement real use cases of pass-by-reference constructs in Python and learn several best practices to avoid pitfalls with your function arguments.
In this course, you’ll learn:
What You'll Learn?
- What it means to pass by reference and why you’d want to do so
- How passing by reference differs from both passing by value and Python’s unique approach
- How function arguments behave in Python
- How you can use certain mutable types to pass by reference in Python
- What the best practices are for replicating pass by reference in Python
More details
User Reviews
Rating
Howard Francis
Instructor's CoursesWanting to learn Python, Howard did what any college instructor would do – he taught a class in it. He loved it. (You’ll have to ask his students how they felt.) He continued learning after the course was over, and found Real Python to be one of the most useful sources of information. Now he’s here hoping to help others.
Howard currently teaches Computer Science and Mathematics at the University of Pikeville in eastern Kentucky. An amateur musician, he plays trumpet in local wind bands, organ at his church, and is learning guitar.

Real Python
View courses Real Python- language english
- Training sessions 16
- duration 1:17:36
- Release Date 2023/01/05