Re: cymbalic reference?

Discussion in 'Python' started by Chris Angelico, Jan 16, 2013.

  1. On Wed, Jan 16, 2013 at 3:56 PM, rh <> wrote:
    > While I'm at it what magic could I use to print "the-class-I-am-in good"
    > instead of hard-coding "Abc good"? I tried __class_ and self.__class__


    Almost there! Try self.__class__.__name__ to get the name as a string.

    ChrisA
    Chris Angelico, Jan 16, 2013
    #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. rh

    cymbalic reference?

    rh, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    126
  2. Benjamin Kaplan

    Re: cymbalic reference?

    Benjamin Kaplan, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    135
    Benjamin Kaplan
    Jan 16, 2013
  3. Terry Reedy

    Re: cymbalic reference?

    Terry Reedy, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    126
    Terry Reedy
    Jan 16, 2013
  4. rh

    Re: cymbalic reference?

    rh, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    145
  5. rh

    Re: cymbalic reference?

    rh, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    146
Loading...

Share This Page