The names are under function scope, but the values are stored as entries in a collection (tuple I think?) called func_defaults (__defaults__ in 3). It's attached to the function object, so I think that means it has the same scope as the declaration.
Python 🙄
Log in to continue
We're a place where coders share, stay up-to-date and grow their careers.
The names are under function scope, but the values are stored as entries in a collection (tuple I think?) called
func_defaults
(__defaults__
in 3). It's attached to the function object, so I think that means it has the same scope as the declaration.Python 🙄