Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xmlparser.Parse(data[, isfinal])
- 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.
- def test(v):
- if v == 0 :
- return 1
- if v == 1 :
- return "Foo"
- if v == 2 :
- return []
- for i in xrange(4):
- print type(test(i))
- <type 'int'>
- <type 'str'>
- <type 'list'>
- <type 'NoneType'>
Add Comment
Please, Sign In to add comment