Why is Python so slow ?- revisited.
Huaiyu Zhu
hzhu at knowledgetrack.com
Wed Jun 21 20:24:25 EDT 2000
On Tue, 20 Jun 2000 01:30:19 GMT, William Dandreta
<wjdandreta at worldnet.att.net> wrote:
>
>My error was that I did the following:
>
>from strop import joinfields, splitfields
>from string import replace
>
>I erroneously assumed that replace would use the joinfields, splitfields
>from strop, but it really used the joinfields, splitfields from string which
>are very slow.
If you really want to replace an internal method in an imported module,
maybe you can try this (not tested):
import string, strop
string.joinfields = strop.joinfields
string.splitfields = strop.splitfields
from string import replace
--
Huaiyu Zhu hzhu at users.sourceforge.net
Matrix for Python Project http://MatPy.sourceforge.net
More information about the Python-list
mailing list