Re: def __init__ question in a class definition

Discussion in 'Python' started by Miki Tebeka, Feb 7, 2005.

  1. Miki Tebeka

    Miki Tebeka Guest

    Hello Jeffrey,

    > I have an open source program which i am trying to add to.
    >
    > class classname(member,member)
    >
    > def __init__(self,list)
    > self.__list = list
    > self.refresh = 360
    >
    > my question is what is the __ (double underscore) represent, if
    > anything, in this bliock of assignmeents? I wish to add some more names
    > but do not know if i need the __ or not?
    >
    > IE: is there any special significance to the __ in this case.

    http://docs.python.org/tut/tut.html

    Bye.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <>
    http://tebeka.bizhat.com
    The only difference between children and adults is the price of the toys
     
    Miki Tebeka, Feb 7, 2005
    #1
    1. Advertisements

  2. Miki Tebeka

    Duncan Booth Guest

    Miki Tebeka wrote:

    >> IE: is there any special significance to the __ in this case.

    > http://docs.python.org/tut/tut.html


    specifically section 9.6

    Also Python Reference Manual, section 2.3.2 Reserved classes of identifiers
     
    Duncan Booth, Feb 7, 2005
    #2
    1. Advertisements

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. Jiong Feng
    Replies:
    0
    Views:
    1,208
    Jiong Feng
    Nov 19, 2003
  2. Jeffrey Borkent

    def __init__ question in a class definition

    Jeffrey Borkent, Feb 7, 2005, in forum: Python
    Replies:
    4
    Views:
    402
    Steve Holden
    Feb 8, 2005
  3. Jeffrey Borkent
    Replies:
    1
    Views:
    404
    Steven Bethard
    Feb 7, 2005
  4. Ray Schumacher

    "parent" in a class __init__ def?

    Ray Schumacher, Jun 10, 2006, in forum: Python
    Replies:
    6
    Views:
    395
    bruno at modulix
    Jun 13, 2006
  5. Ray Schumacher

    "parent" in a class __init__ def?

    Ray Schumacher, Jun 11, 2006, in forum: Python
    Replies:
    0
    Views:
    301
    Ray Schumacher
    Jun 11, 2006
  6. Sean Ross
    Replies:
    3
    Views:
    249
    Aredridel
    Dec 25, 2003
  7. Replies:
    7
    Views:
    465
  8. planetthoughtful

    Newbie: def must come before call to def?

    planetthoughtful, Mar 12, 2007, in forum: Ruby
    Replies:
    4
    Views:
    288
    Pit Capitain
    Mar 12, 2007
Loading...