So, about Javascript and Python. The short of it is that Python’s inner workings are much more complicated and its interface is much less complicated to use. Of course, we put up with Javascript because it reaches places Python can not.

The first difference between Python and Javascript is the type system. I’d say that it’s a difference between Object Oriented and Prototype Oriented, but that would be superficial. The difference is in how programmers choose to craft and reuse their objects and types, not the range of possibilities. This has broad implications for learn-ability, readability, maintainability, and sanity.

In Python, like Javascript, an object is an associative array. In Python, in particular, an object is a hash table. The distinction is that in Python, member selection and item or attribute indexing are distinct services. You can override selection and indexing separately. In Javascript, the distinction between indexing and selection exists for numerically indexed Arrays, but not lexically indexed Objects. Python’s dict type has an associative array for its members and another associative array for its items. This, I find, is wise; the key domains of both attributes and items are open, permitting you to use any key as both a member and an index without a name collision.

Read full article here [The Sourcerer]