소스 검색

Update sample code of `dir()` function

Update the sample code to be consistent with the following description:

> Notice that the list of imported modules is also part of this list.
Kamikat 8 년 전
부모
커밋
169187e8e8
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      modules.md

+ 3 - 3
modules.md

@@ -146,19 +146,19 @@ $ python
 # get names of attributes for current module
 >>> dir()
 ['__builtins__', '__doc__',
-'__name__', '__package__']
+'__name__', '__package__', 'sys']
 
 # create a new variable 'a'
 >>> a = 5
 
 >>> dir()
-['__builtins__', '__doc__', '__name__', '__package__', 'a']
+['__builtins__', '__doc__', '__name__', '__package__', 'sys', 'a']
 
 # delete/remove a name
 >>> del a
 
 >>> dir()
-['__builtins__', '__doc__', '__name__', '__package__']
+['__builtins__', '__doc__', '__name__', '__package__', 'sys']
 ```
 
 **How It Works**