summaryrefslogtreecommitdiff
path: root/Lib/lib-old/newdir.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-old/newdir.py')
-rw-r--r--Lib/lib-old/newdir.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/lib-old/newdir.py b/Lib/lib-old/newdir.py
index 26a7df0c1b..937c49e67b 100644
--- a/Lib/lib-old/newdir.py
+++ b/Lib/lib-old/newdir.py
@@ -65,11 +65,9 @@ def is_function(x):
# Approximation of builtin dir(); but note that this lists the user's
# variables by default, not the current local name space.
-def dir(*args):
- if len(args) > 0:
- if len(args) == 1:
- args = args[0]
- return listattrs(args)
+def dir(x = None):
+ if x is not None:
+ return listattrs(x)
else:
import __main__
return listattrs(__main__)