The // (remainder) operator returns the remainder from an integer division and is defined to be the residue of the dividend after integer division. The sign of the remainder, if nonzero, is the same as that of the original dividend.
This operation fails under the same conditions as integer division, that is, if integer division on the same two terms fails, the remainder cannot be calculated.