Odoo Help


Why g.__dict__['z'] = -4 showing "AttributeError: 'dict' object has no attribute '__dict__'" error? [Closed]

on 9/26/14, 7:26 AM 4,346 views

The Question has been closed for reason: off-topic or not relevant

Ludo - 21South
on 09/29/2014 07:42:06

HI All,

i am learning python now, small python code

g.__dict__['z'] = -4
print g

giving error "AttributeError: 'dict' object has no attribute '__dict__'"

learning source http://en.wikibooks.org/wiki/Python_Programming/Classes


Samba, please post python-related questions on stack overflow and forums of the like. Keep this forum for Odoo/OpenERP related questions.

21south, Ludo - 21South
on 9/29/14, 7:41 AM
Anas ea
On 9/29/14, 7:14 AM

We can also access the members dictionary of a class using the __dict__ member of the class.

g in that course is a class not a dictionary 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/26/14, 7:26 AM
Seen: 4346 times
Last updated: 3/16/15, 8:10 AM