Re: cymbalic reference?

Discussion in 'Python' started by rh, Jan 16, 2013.

  1. rh

    rh Guest

    On Wed, 16 Jan 2013 16:03:47 +1100
    Chris Angelico <> wrote:

    > 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.


    This works. Maybe not that nice to look at...but works.

    >
    > ChrisA
    rh, 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:
    120
  2. Chris Angelico

    Re: cymbalic reference?

    Chris Angelico, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    146
    Chris Angelico
    Jan 16, 2013
  3. Benjamin Kaplan

    Re: cymbalic reference?

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

    Re: cymbalic reference?

    Terry Reedy, Jan 16, 2013, in forum: Python
    Replies:
    0
    Views:
    122
    Terry Reedy
    Jan 16, 2013
  5. rh

    Re: cymbalic reference?

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

Share This Page