Last active
October 23, 2016 03:25
-
-
Save leahein/f7a47a443e813d4837f1881749465530 to your computer and use it in GitHub Desktop.
parse_by_class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_by_class(self, value): | |
if type(value).__name__ == 'unicode': # Do something with strings | |
if type(value).__name__ == 'list': # Do something with arrays | |
if type(value).__name__ == 'dict': # Do something with dictionaries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment