#17851: Db Field instances cannot be compared to other objects
-------------------------------------+-------------------------------------
     Reporter:  charettes            |                    Owner:  charettes
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  field compare        |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 A couple minor notes:
   - A mention of where the code of "our" implementation of total_ordering
 comes from (Python 2.7 I guess?)
   - A very simple test case for total_ordering? (A class that defines
 `__lt__` and `__eq__`, uses @total_ordering, and then test two instances
 with <, >, <=, >=.)

 It would be nice to get another opinion if this is overcomplicating... But
 IMO not, the decorator might find other uses, and following PEP-8 is
 always a good choice.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17851#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to