Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Functions, Packing, and Unpacking Packing and Unpacking Packing Challenge

Adriana Alvear
Adriana Alvear
1,538 Points

What does it mean the word 'pass' in the packing.py challenge?

What does it mean the word 'pass' in the packing.py challenge?

packing.py
def packer(param1, param2, param3):
    pass

packer('Functions', 'are', 'fun!')

2 Answers

From the docs

pass is a null operation -- when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed

In the code you posted, without it packer('Functions', 'are', 'fun!') causes an indentation error because Python would think the line is meant to be part of the function.