MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1xfxtnx/i_love_python/19rov7row95s2/?context=3
r/programminghorror • u/nakurtag • Oct 26 '26
81 comments sorted by
View all comments
4
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
6
Default param is an object reference. So every default param is the same object
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?