Adrian wrote:

> It seemed a bit YAGNI to me, and I prefer avoiding copy.deepcopy() --
> which had been necessary in QuerySet._clone() due to the fact that we
> were using Q() instances. That meant each call to _clone() (for
> filter(), order_by(), etc.) was doing deepcopy(), which made me a bit
> uncomfortable. Also, I tend to prefer plain data structures (such as
> lists and dictionaries) over custom objects unless there's a clear
> need; again, this is a performance thing.

Yep, that makes sense.  One thing - should _clone() actually do call
'self.__class__()' (or something like that), rather than QuerySet()?
Otherwise you lose any subclass behaviour, which I don't think is
desirable.

Luke

Reply via email to