typename

Neil Cerutti mr.cerutti at gmail.com
Tue Jan 29 14:14:36 EST 2008


On Jan 29, 2008 2:06 PM, Neal Becker <ndbecker2 at gmail.com> wrote:
> I want python code that given an instance of a type, prints the type name,
> like:
>
> typename (0) -> 'int'

typename = lambda x: type(x).__name__

-- 
Neil Cerutti <mr.cerutti+python at gmail.com>



More information about the Python-list mailing list