Feb-10-2018, 06:22 AM
def foo(x): passWe have assigned a function to the name foo.
Then you call function maybe one time:
foo(42)
At another place in you code you redefine the function foo:
def foo(x, y): passThe name of the old foo function points now to the new foo-function.
The old function should be garbage collected, because there is no reference to it.
Yes, you can do this in Python, but the costs will be bugs and unexpected behavior.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!