mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
globals
This commit is contained in:
@@ -1,7 +1,31 @@
|
||||
# -----------------
|
||||
# for loops
|
||||
# -----------------
|
||||
|
||||
for a in [1,2]:
|
||||
#? ['real']
|
||||
a.real
|
||||
|
||||
for a1 in 1,"":
|
||||
#? ['real']
|
||||
a1.real
|
||||
#? ['upper']
|
||||
a1.upper
|
||||
|
||||
for a3, b3 in (1,""), (1,""):
|
||||
#? ['real']
|
||||
a3.real
|
||||
#? []
|
||||
a3.upper
|
||||
#? []
|
||||
b3.real
|
||||
#? ['upper']
|
||||
b3.upper
|
||||
|
||||
# -----------------
|
||||
# with statements
|
||||
# -----------------
|
||||
|
||||
with open('') as f:
|
||||
#? ['closed']
|
||||
f.closed
|
||||
@@ -13,6 +37,10 @@ with open('') as f1, open('') as f2:
|
||||
f2.closed
|
||||
|
||||
|
||||
# -----------------
|
||||
# global vars
|
||||
# -----------------
|
||||
|
||||
def global_define():
|
||||
global glob
|
||||
glob = 3
|
||||
|
||||
Reference in New Issue
Block a user