Guest User

Untitled

a guest
Jan 18th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. xmlparser.Parse(data[, isfinal])
  2.  
  3. Parses the contents of the string data, calling the appropriate handler functions to process the parsed data. isfinal must be true on the final call to this method; it allows the parsing of a single file in fragments, not the submission of multiple files. data can be the empty string at any time.
  4.  
  5. def test(v):
  6. if v == 0 :
  7. return 1
  8. if v == 1 :
  9. return "Foo"
  10. if v == 2 :
  11. return []
  12.  
  13. for i in xrange(4):
  14. print type(test(i))
  15.  
  16. <type 'int'>
  17. <type 'str'>
  18. <type 'list'>
  19. <type 'NoneType'>
Add Comment
Please, Sign In to add comment