typename

Discussion in 'Python' started by Neal Becker, Jan 29, 2008.

  1. Neal Becker

    Neal Becker Guest

    I want python code that given an instance of a type, prints the type name,
    like:

    typename (0) -> 'int'

    I know how to do this with the C-api, (o->tp_name), but how do I do it from
    python?

    type(0) prints "<type 'int'>", not really what I wanted.
    Neal Becker, Jan 29, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier Decoret

    Gcc complain about typename

    Xavier Decoret, Jul 4, 2003, in forum: C++
    Replies:
    1
    Views:
    492
    Dhruv
    Jul 4, 2003
  2. Gina Yarmel

    typename, typedef, and resolution

    Gina Yarmel, Aug 13, 2003, in forum: C++
    Replies:
    4
    Views:
    4,751
    Sergei Emantayev
    Aug 13, 2003
  3. Steve Hill

    implicit typename in template

    Steve Hill, Sep 6, 2003, in forum: C++
    Replies:
    1
    Views:
    432
    ES Kim
    Sep 6, 2003
  4. Alexander Malkis

    class vs. typename

    Alexander Malkis, Apr 6, 2004, in forum: C++
    Replies:
    7
    Views:
    13,060
    psubramani
    Oct 20, 2012
  5. Jakob Bieling

    Q: typename or not typename?

    Jakob Bieling, Mar 14, 2006, in forum: C++
    Replies:
    2
    Views:
    344
    Rolf Magnus
    Mar 14, 2006
Loading...

Share This Page