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

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

    def __init__ question in a class definition

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

    "parent" in a class __init__ def?

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

    "parent" in a class __init__ def?

    Ray Schumacher, Jun 11, 2006, in forum: Python
    Replies:
    0
    Views:
    255
    Ray Schumacher
    Jun 11, 2006
  5. Replies:
    7
    Views:
    170
Loading...

Share This Page