New submission from Alka Yadav:

When __getattribute__ method is overrriden in a class,then in case of calling 
an attribute not in class object should throw KeyError.

But when calling dir on classs object gives an empty list as dir(dictobject) 
calls dictobject.__getattribute__(dir) and it throws KeyError instead of 
AttributeError in dir annd it returns NULL upstream

So dir source code need to be fixed to catch KeyError appropriately.

----------
components: Library (Lib)
files: direrror.py
messages: 244798
nosy: alkayadavi...@gmail.com
priority: normal
severity: normal
status: open
title: dir(dictobject) returns empty list when __getattribute__ is overriden in 
the class
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file39613/direrror.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24378>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to