14 Oct
2012
14 Oct
'12
12:04 a.m.
On 2012-10-14 00:42, Greg Ewing wrote:
Mike Meyer wrote:
def __$<op>__(self, other, right):
<op> must match a new grammer symbol "operator_symbol", with limits on it to for readability reasons: say at most three characters, all coming from an appropriate unicode class or classes
If it's restricted it to single Unicode character, we could use its Unicode name as the method name:
def __CIRCLE_PLUS__(x, y): ...
If it's more than one codepoint, we could prefix with the length of the codepoint's name: def __12CIRCLED_PLUS__(x, y): ...