On 02/11/2016 01:16 PM, immerrr again wrote:
> well Python only allows one side's operator override to be called, so > when DateTime is on the left, its own operate() method is called and not > yours. Excuse me for barging in, but the operator function can return a "NotImplemented" singleton and Python will retry the operation reflected on the other operand: https://docs.python.org/3.5/reference/datamodel.html#emulating-numeric-types E.g.: https://gist.github.com/immerrr/c42ed17f437c8473e8d8
Good point, but this may not be an option. Currently we return NULLTYPE for such ambigious comparisons but it's not known what side effects would occur if we across the board assumed the other side should operate (plus the other side needs to *never* return NotImplemented).
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
