Companies Home Search Profile

Pass by Reference in Python: Best Practices

Focused View

Howard Francis

1:17:36

276 View
  • 461 - Lesson 1 Welcome.mp4
    02:58
  • 461 - Lesson 2 Parameter Passing.mp4
    03:52
  • 461 - Lesson 3 Pass by Value.mp4
    05:47
  • 461 - Lesson 4 Pass by Reference.mp4
    04:13
  • 461 - Lesson 5 Compare PbV PbR.mp4
    04:55
  • 461 - Lesson 6 Pass by Assignment.mp4
    04:40
  • 461 - Lesson 7 Multiple Return Values.mp4
    08:57
  • 461 - Lesson 8 Conditional Return.mp4
    09:13
  • 461 - Lesson 9 Assignment Expression.mp4
    05:14
  • 461 - Lesson 10 Python Assignment.mp4
    05:00
  • 461 - Lesson 11 Function Arguments.mp4
    03:34
  • 461 - Lesson 12 not Global Variables.mp4
    03:11
  • 461 - Lesson 13 Return and Replace.mp4
    04:25
  • 461 - Lesson 14 Object Attributes.mp4
    05:48
  • 461 - Lesson 15 Mutable Collections.mp4
    04:39
  • 461 - Lesson 16 Summary.mp4
    01:10
  • pass by reference slides.pdf
  • pass by ref sample code.zip
  • 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
    0
    0
    0
    0
    0
    average 0
    Total votes0
    Focused display
    Category
    Howard Francis
    Howard Francis
    Instructor's Courses

    Wanting 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.

    Learn Python online: Python tutorials for developers of all skill levels, Python books and courses, Python news, code examples, articles, and more.
    • language english
    • Training sessions 16
    • duration 1:17:36
    • Release Date 2023/01/05