python type function for built-in types -
python type function for built-in types -
i see can utilize type create object @ runtime using class name
type('foo',(object,), dict(x=1))
how can int or str or datetimetype.
type('datetimetype', (object,), dict(???)
what dict value be? storing tuple(row) db query csv. when read back, want convert original tuple can utilize existing functions process tuple. read back
joe,23,dec 11 2001
i have saved type string of each type know cast to.
python python-2.7
Comments
Post a Comment