On 5/6/06, Luke Plant <[EMAIL PROTECTED]> wrote: > But, thinking about it, perhaps it should actually raise IndexError in > this situation, and use DoesNotExist for explicit .get() calls? This > would make it act more like other sequences. I don't know how much > code this might impact.
That sounds better. I don't think it would impact much code at this point -- go ahead and make the change. > On a related note, I've realised you can use query_set[:] to do a clone, > just like with lists (except it's more like a deep copy, but > inexpensive because QuerySets are immutable). I believe there are some > bits of code external to the QuerySet class that are using ._clone() -- > shall I change them to use the [:] idiom? Let's leave it at _clone(), because it's easier to understand that way. The "[:]" can be easy to miss. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---
