I’m a professional Python developer as well and JS objects are one of the things I envy. Python objects are still opaque to me after more than a decade. I couldn’t tell you all of the magic methods nor could I describe the functions of those that I do know. Many of the things that Python objects support, such as inheritance, strike me as overtly undesirable (it would be much better to use composition in all cases, IMO), and the meta type system seems far more complicated than it needs to be (partly because inheritance confounds things)—although I was relieved to discover that you can call type() to generate new types instead of using the meta type class syntax.
On the other hand, as far as I am aware, JS objects are just bags of attributes with relatively few special magic attributes. There also seems to be less of an obsession with inheritance in JS, probably because the syntax makes a functional style more ergonomic although perhaps also because prototype inheritance is relatively cumbersome.
In general, JS’s object system feels more transparent to me, although I wish they would go further and preclude the special syntaxes for creating types. There’s nothing wrong with a function that returns types (which are either objects or closures depending on your religion). But I suppose I’m well on my way to reinventing lisp at that point.
On the other hand, as far as I am aware, JS objects are just bags of attributes with relatively few special magic attributes. There also seems to be less of an obsession with inheritance in JS, probably because the syntax makes a functional style more ergonomic although perhaps also because prototype inheritance is relatively cumbersome.
In general, JS’s object system feels more transparent to me, although I wish they would go further and preclude the special syntaxes for creating types. There’s nothing wrong with a function that returns types (which are either objects or closures depending on your religion). But I suppose I’m well on my way to reinventing lisp at that point.