Jython bugs or features?
Jeff Shannon
jeff at ccvcorp.com
Tue Feb 26 15:54:39 EST 2002
Dinu Gherman wrote:
> I'm pretty surprised! I knew the Python test suite is *very* far
> from complete, but list() is an *extremely* crucial function,
> isn't it?
Not in my (admittedly somewhat limited) experience, at least not in the way that
you're using it. I've used list() to convert strings or tuples to lists; I've
never used it to copy a list, and it wouldn't have even occurred to me that it
*should* copy a list. (What's the result of int(5)? Why would you use it? Same
idea.) Looking at the docs, I suppose that it *is* documented behavior, but
it's still somewhat obscure. If I want a copy, I'll ask for a copy (using
either copy.copy() or full-slice notation [:]); if I'm using list(), it's
because I want to convert some non-list sequence to a list. So, I don't find it
at all surprising that nobody would have noticed this bug in Jython before.
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list