r/programminghorror • • Oct 26 '26

Python I love Python

303 Upvotes

81 comments sorted by

View all comments

4

u/RngdZed Oct 26 '26

The list is stored directly in the parameter without actually giving it an argument? I'm baffled, I didn't know this was a behavior, so weird

Is this something that someone could ELI5 to my smooth brain?

6

u/bigorangemachine Oct 26 '26

Default param is an object reference. So every default param is the same object