mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merge alpha100 branch back to main trunk
This commit is contained in:
parent
2979b01ff8
commit
b6775db241
176 changed files with 5302 additions and 3668 deletions
|
@ -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__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue