New Python User Question about Python.

Andrew Dalke dalke at dalkescientific.com
Fri Aug 24 12:00:00 EDT 2001


Grant Griffin wrote:
>But in all honesty, how often do you really
>_need_ to do generic programming?  I'm guessing, only a very
>small fraction of the time--1%, maybe?

All the time.  I work with file-like objects, which are file
handles, or cStringIOs, or StringIOs, or wrappers around file
handles that allow pushing data back, or wrappers around compressed
file streams, or popen file handles, or socket connections, or ....

I also work with strings that can be "" or u"" strings.

And there's code that uses a character string just as well as
it does a (biological) Seq object.

>Dynamic typing always comes at a cost (overhead)

Yep.

> in order to give you a benefit
>which--in the vast majority of cases--you don't need and can't even use,
that
>is, generic programming.

But I do need it, and enjoy it.  I know how to do it in C++ but my
fingers (and brain) aches thinking about it.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list