Skip to content

Instantly share code, notes, and snippets.

@fredrick
Created March 10, 2011 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredrick/865002 to your computer and use it in GitHub Desktop.
Save fredrick/865002 to your computer and use it in GitHub Desktop.
Object instantiation of a data type blender
test = Test(
string='test-554e4b55e8cc57f39f16f335b0a63825',
integer=123,
float=3.14159265,
array=['thing 1', 'thing 2', 'thing 3'],
tuple=('string', 123, 3.14159265),
dictionary={'this 1': 'that 1', 'this 2': 'that 2'},
tuples_in_array=[('string', 123, 3.14159265), ('string', 456, 3.14159265)],
arrays_in_tupple=(['thing 1', 'thing 2', 'thing 3'], ['thing 4', 'thing 5', 'thing 6']),
complex_nested_mixed_data_types=(
{
'tuples_in_array_in_dictionary_in_tupple': [('string', 123, 3.14159265), ('string', 456, 3.14159265)]
},
[0, 1, 2, {'three': 3}, (4, 5, 6, (7, 8, [9, 10], {'eleven': 11}))]
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment