Skip to content

Instantly share code, notes, and snippets.

@nathania
Created June 10, 2012 17:44
Show Gist options
  • Save nathania/2906742 to your computer and use it in GitHub Desktop.
Save nathania/2906742 to your computer and use it in GitHub Desktop.
Python type conversion
# Save one object's type and use as a function later
type_1 = type(type_1_obj)
type_2_to_1 = type_1(type_2_obj)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment