Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAdriana Alvear
1,538 PointsWhat does it mean the word 'pass' in the packing.py challenge?
What does it mean the word 'pass' in the packing.py challenge?
def packer(param1, param2, param3):
pass
packer('Functions', 'are', 'fun!')
2 Answers
KRIS NIKOLAISEN
54,972 PointsFrom 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.
Adriana Alvear
1,538 Pointsthanks!