On 12/12/16 23:23, Chris Angelico wrote:
In JavaScript, it's normal to talk about "calling a function as a constructor". When you do, there is a 'this' object before you start.
No there isn't. There is an implicit binding of a variable called "this" based on the syntactic sugar of whether you're calling a function as method on an object or not.
In "strict" mode, this has been redefined to be "undefined" (i.e., there is no object) for when you're not - otherwise it will be a binding to the global "document" object (and in Node.js, I think something else entirely. It's a mess ...).
Ultimately, every language has slightly different semantics
You're not wrong ;) E. -- https://mail.python.org/mailman/listinfo/python-list