Re:Reasons Python Sucks
by arduinomancer on Tuesday December 18, 2018 @01:04PM
(#18708837)
What is a namespace binding? Can you explain at a low level what that means?
Compare a variable assignment in C and Python.
In C:
int i = 17;
Means "set aside one int's worth of storage and fill it with the bit pattern for the number 17".In Python:
i = 17
means "create an int object with the value 17 and bind it in the current namespace dictionary to the name i".
Re:Reasons Python Sucks
by colanderman on Tuesday December 18, 2018 @04:05PM
(#18710556)
The semantics are identical.
No, Python doesn't even do that, because Python variables aren't names for storage locations to begin with. They're namespace bindings. Passing a variable to a Python function means transferring a namespace binding from the caller's namespace to the function's local namespace.