Killin' Newbie question

Gregoire Welraeds greg at perceval.be
Mon Feb 28 08:50:34 EST 2000


I can't access the __init__ method outside of the object, so the
following is disallowed :
----
class huh():
	def __init(self):
		[some initialisation]

ough= huh()

[some code] 

ough.__init__()
----

Right ?
The following should be allowed ?

class huh():
	def __init__(self):
		[some initialisation]

	def ReInit(self):
		self.__init__()

ough= huh()
[some code]
ough.ReInit()

Do I have to rewrite the __init__ function in the ReInit() or the call to 
the init() function inside the ReInit is enough ?
Isn't there a better way to do this kind of job, i mean in a OOP point of
view.

Other little question, what about the following (regarding another remark
posted before) :

def __init__(this):
	...

--
Life is not fair
But the root password helps
--

Gregoire Welraeds
greg at perceval.be
Perceval Development team
-------------------------------------------------------------------------------
Perceval Technologies sa/nv	Tel: +32-2-6409194		
Rue Tenbosch, 9			Fax: +32-2-6403154		
B-1000 Brussels			general information:   info at perceval.net
BELGIUM				technical information: helpdesk at perceval.net
URL: http://www.perceval.be/
-------------------------------------------------------------------------------





More information about the Python-list mailing list