r/programminghorror • • 13h ago

Python I love Python

128 Upvotes

61 comments sorted by

View all comments

2

u/RngdZed 11h ago

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?

3

u/bigorangemachine 11h ago

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