Procházet zdrojové kódy

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 před 8 roky
rodič
revize
169187e8e8
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  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**