#NEWLINE# def cldr_modulo( a , b ) : #NEWLINE# #INDENT# 'Javaish modulo.  This modulo operator returns the value with the sign\n    of the dividend rather than the divisor like Python does:\n\n    >>> cldr_modulo(-3, 5)\n    -3\n    >>> cldr_modulo(-3, -5)\n    -3\n    >>> cldr_modulo(3, 5)\n    3\n    ' #NEWLINE# reverse = 0 #NEWLINE# if ( a < 0 ) : #NEWLINE# #INDENT# a *= ( - 1 ) #NEWLINE# reverse = 1 #NEWLINE# #UNINDENT# if ( b < 0 ) : #NEWLINE# #INDENT# b *= ( - 1 ) #NEWLINE# #UNINDENT# rv = ( a % b ) #NEWLINE# if reverse : #NEWLINE# #INDENT# rv *= ( - 1 ) #NEWLINE# #UNINDENT# return rv