Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread Mike C. Fletcher
Little class that does restrictions/checks on adding to a list (simply subclass and put your restrictions in the beforeAdd or beforeMultipleAdd methods). http://pytable.sourceforge.net/pydoc/basictypes.rlist.html http://cvs.sourceforge.net/viewcvs.py/basicproperty/properties/basictypes/rlist.py?

Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread bearophileHUGS
The array module allows you to specify a single type of elements. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread gene tani
ankit wrote: > Is it possible to limit the size of list in python. > I want to make list of 5 elements. How can I achieve this thing in > python. And one more thing can we declare list to store elements of > same type as in c, C++ we can declare an > array which can have 5 elements of type int. >

Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread gene tani
gene tani wrote: > ankit wrote: > > Is it possible to limit the size of list in python. > > I want to make list of 5 elements. How can I achieve this thing in > > python. And one more thing can we declare list to store elements of > > same type as in c, C++ we can declare an > > array which can ha

Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread Erik Max Francis
ankit wrote: > Is it possible to limit the size of list in python. > I want to make list of 5 elements. How can I achieve this thing in > python. And one more thing can we declare list to store elements of > same type as in c, C++ we can declare an > array which can have 5 elements of type int. >

Limiting the size of List and making it Homogeneous

2006-01-13 Thread ankit
Is it possible to limit the size of list in python. I want to make list of 5 elements. How can I achieve this thing in python. And one more thing can we declare list to store elements of same type as in c, C++ we can declare an array which can have 5 elements of type int. C, C++: int intarr[5]