isinstance checks for if/while

This commit is contained in:
David Halter
2012-10-04 00:34:26 +02:00
parent 8d842dd596
commit 7e39a7d1ba
4 changed files with 77 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
if isinstance(i, str):
#? str()
i
if isinstance(j, (str, int)):
#? str() int()
j
while isinstance(k, (str, int)):
#? str() int()
k
if not isinstance(k, (str, int)):
#?
k
while not isinstance(k, (str, int)):
#?
k