fabioz/Pydev — pull request #117 by akruis (2014-01-25 21:08:35+00:00)
Title: Fix special methods of class pydevd_constants.Null

The current implementation of Null.__getattr__(self, mname) always returns self. This causes problems, if the mname is the name of a special method like '__iter__', '__getinitargs__', '__getstate__' or '__reduce__'. If a class implements special methods, it should follow the specification. For instance currently ```for x in Null(): pass``` causes an endless loop.

The patch adds Null.__iter__() and modifies __getattr__(self, mname) to raise AttributeError on special names.
If you consider this modification to aggressive, please consider pulling commit 6097e285e96f44 instead. It doesn't touch __getattr__ but implements all pickling related method instead.