0

Can javascript objects be compared with python dictionaries?

11th Sep 2020, 6:52 AM
Shafayet Arish
Shafayet Arish - avatar
2 Answers
+ 1
In no way! Dictionaries cannot be instantiated, inherited, they do not have a `self` context. They cannot contain self methods or have a constructor. JavaScript objects are similar to python objects except they are prototype-based not class-based. In python, a class is a blueprint for an object. In JavaScript, a prototype is a blueprint of an object.
11th Sep 2020, 6:58 AM
Ore
Ore - avatar
0
nah, but json can be converted to a python dictionary in python very easily using the json module
11th Sep 2020, 7:00 AM
Slick
Slick - avatar