Get column of a matrix python with index operator
Before improving the code it would be worth fixing the following problems.


The docstring says:

&gt;&gt; mat[3, :] return the 4th row


but the implementation tries to return a column:

elif isinstance(arg[0], int) and isinstance(arg[1], slice):
    return self.get_column(arg[1])


but since arg[1] is a slice object, this will fail in some way. (I can't say exactly how since you didn't show us the code for get_column.)
The indexing is inconsistent. As it says in the docstring:

&gt;&gt; mat[3, :] return the 4th row


but to get the first element of the fourth row, you have to write:

mat[0, 3]


because the indexes get swapped:

y, x = arg
return self.matrix[x][y]


This is contrary to the way indexing works in NumPy and so seems very likely to lead to confusion.
If you pass a tuple of length 1 then this causes an IndexError:

&gt;&gt;&gt; mat[:,]
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "cr189408.py", line 21, in __getitem__
    elif isinstance(arg[0], slice) and isinstance(arg[1], int):
IndexError: tuple index out of range

If you pass a pair of slices then this is ignored and __getitem__ returns None.

&gt;&gt;&gt; mat[:,:] is None
True


In NumPy this would return the whole matrix.
The code only checks whether the argument is a slice or not, and if it is a slice, it assumes that the whole row or column is required. This is right if a bare : was passed, but misleading if some other slice was passed. In NumPy mat[0:2, 0] gets the first two element of column 0, but the code in the post returns the whole of column 0.