Extend a class?
Nor Pirzkal
npirzkal at eso.org
Mon Sep 25 10:01:03 EDT 2000
Hi,
I have a stupid question:
I would like to know if I could easily create a module, say called
futils.py, which would allow me, once loaded, to add some methods to
various objects, such as lists. I would like to be able to do something
like:
l=["123",1,2,4]
l.writeasciifile("test.dat")
where writeasciifile() is a function that would take care of doing
various (obscure) things....
Cheers,
Nor
--
--------------------------------------------------------------
Nor Pirzkal E-mail: npirzkal at eso.org
European Southern Observatory http://www.stecf.org/~npirzkal
Karl-Schwarzschild-Strasse 2 Phone: (+49 89) 32006-401
D-85748 Garching bei Muenchen Fax: (+49 89) 32006-480
Germany
/"\
\ /
x ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \
--------------------------------------------------------------
More information about the Python-list
mailing list