Newbie Newbie, we are all Newbie to something

Gregoire Welraeds greg at
Fri Feb 25 08:44:26 EST 2000


Recently I have done the following :

newLang= me.addLanguage(Python)
python_list["me"]= "greg"

except UnderstandingError:
	python_list["me"].sendmessage("help needed!")
--- Question start here ---
I'm new to Python and partially new to OOP (small experience in C++). I'm
fluent in C, shell script, awk, and some other programming language.
I'm currently reading the Python Reference Manual and I got a small
question regarding the __del__() statement in a class definition.
I understand his utility when you don't have a garbage collector and
memory management. In this case, it is important to have del statement to
free object properly. But what if you have ?
In the same topic, do we have to explicitly close an open file before
a/ a function 
	EG: 	def blahblah():
			f= open(some file)
b/ the interpreter
 	EG:	>>> f = open(some file)
		>>> ...
		>>> f.close()
		>>> CTRL-D

Or is this automatically handled by Python. I guess the close function is
given to be used, not to generate some stupid mail like this one. 

Sorry for my newbyness ...


Life is not fair
But the root password helps

Gregoire Welraeds
greg at
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
BELGIUM				technical information: helpdesk at

More information about the Python-list mailing list