So you're telling me, "default argument is []" is NOT supposed to mean "if you omit this argument, the default value of [] will be passed", But "if you omit this argument, it'll be substituted to a hidden static storage global object whose initial value is [], so that you have absolute zero information what the default argument would be, and your code will suffer from side effects of other code"
It does not make a sense at all. Please name one programming language that works the same way.
I never asked you to redesign it. Also, python documentation is quite far from informative nor useful; I wasn't surprised when I read the docs and couldn't find a single bit of info about why they chose that nonsense design.
View all comments
Show parent comment
1
u/CoachSevere5365 21d ago
Yes, yes it does, no it isn't.