Skip to main content
Loading page…
Python Mastery
Chapter 6
Lesson 2 of 4
Arguments In Depth
Contents
Notes
Tutor
Concept
Positional vs Keyword Arguments
Loading activity…
Previous
1 / 7
Continue
Contents
Notes
Discussion
Tutor
25 min
7 activities
0 of 7 done
In this lesson
1
Positional vs Keyword Arguments
2
Star Args: *args and **kwargs
3
Keyword-Only Parameters & Unpacking at Call Sites
4
The Mutable Default Trap
5
Practice: Build a Flexible join Function
6
Pitfall: Confusing *args in the Signature vs * at the Call Site
7
Match the Syntax to Its Meaning
Objectives
Learner can call functions using both positional and keyword arguments
Learner can define default parameter values and explain the mutable-default trap
Learner can write functions that accept any number of positional (*args) or keyword (**kwargs) arguments
Learner can use keyword-only parameters and unpack sequences/dicts at call sites
Chapter 6 · Functions
Defining & Calling Functions
Arguments In Depth
Scope: The LEGB Rule
Recursion & Lambdas
Previous: Defining & Calling Functions
Next: Scope: The LEGB Rule