Creating an Array: Difference between revisions

→‎{{header|Python}}: Add ctypes arrays, and struct.
(Undo revision 51626 by Glennj (Talk))
(→‎{{header|Python}}: Add ctypes arrays, and struct.)
Line 760:
 
Note: In Python 2.6 the ''collections.namedtuple'' factory was added to the standard libraries. This can be used to create classes of lightweight objects (c.f. the Flyweight design pattern) which are tuples that can additionally support named fields.
 
 
The [http://docs.python.org/library/ctypes.html#arrays ctypes module] can construct specialised arrays for interfacing with external C functions. The [http://docs.python.org/library/struct.html struct module] allows a string of characters to be interpreted as an array of values of C types such as 32 bit ints, float, etc.
 
=={{header|Raven}}==
Anonymous user