Deprecating reload() ???

Skip Montanaro skip at pobox.com
Tue Mar 16 17:01:12 EST 2004


    Terry> To make the formula nearly as clear without the overhead, I would
    Terry> consider

    Terry> import PZfuncs as z
    Terry> def h23(freq):
    Terry>     s = complex(2*pi*freq)
    Terry>     return z.h0 * (s-z.z1) * (s-z.z2) / ((s-z.p1) * (s-z.p2) * (s-z.p3))

Or even:

    def h23(freq):
        z = PZfuncs
        s = complex(2*pi*freq)
        return z.h0 * (s-z.z1) * (s-z.z2) / ((s-z.p1) * (s-z.p2) * (s-z.p3))

(slightly faster and avoids the module aliasing problem Dave is concerned
about).

Skip




More information about the Python-list mailing list