Removed some redundant header includes.

dir(object) now returns object.__dict__.keys() even if __dict__ is not
a dictionary.
This commit is contained in:
Guido van Rossum 1996-05-23 22:49:07 +00:00
parent 441e4ab802
commit 795ba583f2
1 changed files with 5 additions and 5 deletions

View File

@ -28,12 +28,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "node.h"
#include "graminit.h"
#include "sysmodule.h"
#include "bltinmodule.h"
#include "import.h"
#include "pythonrun.h"
#include "ceval.h"
#include "modsupport.h"
#include "compile.h"
#include "eval.h"
@ -356,7 +352,11 @@ builtin_dir(self, args)
}
}
else {
v = newlistobject(0);
v = PyObject_CallMethod(d, "keys", NULL);
if (v == NULL) {
PyErr_Clear();
v = newlistobject(0);
}
}
DECREF(d);
return v;