def __init__ question in a class definition

  • Thread starter Jeffrey Borkent
  • Start date
J

Jeffrey Borkent

Hi There,

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.

Cheers






--
Jeffrey Borkent
Systems Specialist
Information Technology Services
University of Adelaide
Level 7, 10 Pultney Street
Adelaide. 5005
Ph: 8303 3000
(e-mail address removed)


---------------------------------
CRICOS Provider Number 00123M
-----------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
 
M

M.E.Farmer

Jeffrey Borkent
Systems Specialist
Information Technology Services

With that kind of credentials, and the fact that you claim you are a
system specialists....
I don't know you have me worried already.
I guess for you I just say RTFM.
If you think that is harsh then don't ask a 2nd grade question yet
claim/pretend to be some sorta system specialists.
You tried searching the archives first I am sure.
Go here http://www.python.org and *read*, come back when you are
really stuck.
M.E.Farmer
P.S. YES the __ matter, they identify special methods ! __init__ is the
class CONSTRUCTOR.
 
S

Steve Holden

M.E.Farmer said:
With that kind of credentials, and the fact that you claim you are a
system specialists....
I don't know you have me worried already.
I guess for you I just say RTFM.
If you think that is harsh then don't ask a 2nd grade question yet
claim/pretend to be some sorta system specialists.

Hey, ease up, this is comp.lang.python, remember.
You tried searching the archives first I am sure.
Go here http://www.python.org and *read*, come back when you are
really stuck.
M.E.Farmer
P.S. YES the __ matter, they identify special methods ! __init__ is the
class CONSTRUCTOR.
Next time, could we try exchanging the body of the message and the PS?
That way you could have omitted the PS when you got half way through it
and realised you were just wasting your time and everyone else's ...

got-out-the-wrong-side-of-bed-ly y'rs - steve
 
M

M.E.Farmer

Steve said:
Hey, ease up, this is comp.lang.python, remember.

Next time, could we try exchanging the body of the message and the PS?
That way you could have omitted the PS when you got half way through it
and realised you were just wasting your time and everyone else's ...

got-out-the-wrong-side-of-bed-ly y'rs - steve
P.S. And in an effort to keep on topic...PYCON!!
steve,
I stand by what I said.
Teach a man to fish feed him for a lifetime.
Re-read it, memorize it, and keep it near.
I read comp.lang.py for 3 years before I posted anything, and then i
posted an ANSWER!
I don't go around asking dirt simple questions that would be solved
with a quick read of the docs, usenet archives , Google, books that
have been written about Python,etc.... He should have been *reading*
not *posting*.
I can not understand why you have a problem with me pointing out he
should read the documentation. Why do you think RTFM exist, for people
like that, they are a timesink. He can redeem himself if he just goes
and reads a little and comes back looking like he made some effort.
This guy has a 6 mile sig that says he ought to know better. Had he
come with a different sig *maybe* and a question that did not scream
'''HEY I WANT YOU TO ANSWER EVERYTHING FOR ME BECAUSE I CAN NOT EVEN
READ THE BASIC DOCUMENTATION ON MY OWN'''.
Next time, could we try exchanging the body of the message and the PS?
That way you could have omitted the PS when you got half way through it
and realised you were just wasting your time and everyone else's ...

I tell him where he is wrong first then I answer the question, sounds
like *YOU* ....Now I have your attention.
What do you think that post was meant to do? Snap him off at the root?
Make him cry? Maybe it was to nudge him to read the docs, so he can
*learn* on his own.
Next time you could just write my post for me! That way I can only
waste as much time as you deem acceptable! Now that I think about it,
if we just answer every question every poster has about any detail of
Python, then we can all sing along and hold hands, who needs to write
documentation or even books about Python look at all the time we will
save...
got-out-the-wrong-side-of-bed-ly y'rs - steve
Which-side is-the wrong-side-ly yr's - M.E.Farmer
 
S

Steve Holden

M.E.Farmer said:
P.S. And in an effort to keep on topic...PYCON!!
steve,
I stand by what I said.
Teach a man to fish feed him for a lifetime.
Re-read it, memorize it, and keep it near.
I read comp.lang.py for 3 years before I posted anything, and then i
posted an ANSWER!
I don't go around asking dirt simple questions that would be solved
with a quick read of the docs, usenet archives , Google, books that
have been written about Python,etc.... He should have been *reading*
not *posting*.
I can not understand why you have a problem with me pointing out he
should read the documentation. Why do you think RTFM exist, for people
like that, they are a timesink. He can redeem himself if he just goes
and reads a little and comes back looking like he made some effort.
This guy has a 6 mile sig that says he ought to know better. Had he
come with a different sig *maybe* and a question that did not scream
'''HEY I WANT YOU TO ANSWER EVERYTHING FOR ME BECAUSE I CAN NOT EVEN
READ THE BASIC DOCUMENTATION ON MY OWN'''.




I tell him where he is wrong first then I answer the question, sounds
like *YOU* ....Now I have your attention.
What do you think that post was meant to do? Snap him off at the root?
Make him cry? Maybe it was to nudge him to read the docs, so he can
*learn* on his own.
Next time you could just write my post for me! That way I can only
waste as much time as you deem acceptable! Now that I think about it,
if we just answer every question every poster has about any detail of
Python, then we can all sing along and hold hands, who needs to write
documentation or even books about Python look at all the time we will
save...



Which-side is-the wrong-side-ly yr's - M.E.Farmer
Well, actually my point was that if we just save time by not answering
such questions we avoid a reputation for hostility while still
encouraging people to use other resources. But anyway, thanks for saying
"PyCon"!

regards
Steve
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top