Python matrices are usually defined with numpy scipy array or similar. e.g. >>> matrix1 = [[1, 2], [3, 4], [5, 6]] I would like to have easier way of defining matrices, for example: >>> matrix = [1, 2; 3, 4; 5, 6]
>>> matrix = [ 1, 2; 3, 4; 5, 6;] Any ideas how could this be done? The ";" sign is reserved, the "[ ]" is used for lists. Also, how to program custom operations for this new "class?" matrix ??? For example: >>> matrix + 2 [ 3, 4; 5, 6; 7, 8;] Possibly with operator overloading? I appreciate all your comments, directions, pointers. mosi -- http://mail.python.org/mailman/listinfo/python-list