constructors for lists and tuples

N Becker nbecker at fred.net
Tue Dec 11 08:19:53 EST 2001


what are the constructors for lists and tuples?  I wanted to make a
list of a known size and then populate it.  Based on my experience
with C++ and STL, I expected to find a constructor that took a size. 
I would expect to find like:

list (size, init=None)

2 problems.  

1) I don't know how to do this

2) I don't know where to find documentation on this.  All the modules
document the constructors for their extensions, but looking at the
library reference, I didn't see anything documenting the complete
behaviour of the builtin list or tuple.



More information about the Python-list mailing list