#33724: Changing from list to set in `exclude` raises errors, and is not
documented.
-------------------------------------+-------------------------------------
     Reporter:  אורי                 |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  4.1
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

 > All built-in methods do exactly the same number of conversion as before
 1ea7e3157d1f9b4db71e768d75ea57e47dbd49f9 just using set(...) instead of
 list(...).

 The problem is not in Django code, the problem is in user code when you
 have to do smart custom things with exclude, and you don't know if you get
 a list or a set, so you are forced to cast the variable each time before
 starting to manipulate it. If different sort of types in the same category
 (typically iterables) can be seen as a feature, I don't like the
 `list`/`set` potential mix.

 > IMO we can document set as the preferable option, e.g.

 +1, I think this is going in the right direction.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33724#comment:10>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070180e16f2ffb-588b83bd-75fb-4466-a5c5-b93bba21c3d7-000000%40eu-central-1.amazonses.com.

Reply via email to