muqube
  • About
  • Articles
Sep 4, 2014

Python object from dictionary

It is more convenient to access the fields of a class using the dot notation than accessing the entries in a dictionary. Python allows a quick conversion between simple dictionaries to python objects.

x = myObj.x
x = myDict['x']

A python object can be instantiated from the contents of a ...

  • JavaScript
  • Python

Copyright © 2015 - 2018 Raiyan Kamal, All Rights Reserved.