On 12/2/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Frankly, I have found the slicing syntax hard to understand and
> error-prone myself.

I guess I'm curious as to what's difficult or error-prone about it;
I've never run into a problem where slicing was the cuplrit, and it
feels like a more intuitive and Pythonic syntax than the "limit" and
"offset" arguments we used to have in the pre-magic-removal days.

> I think one of the reasons it seems magic is that
> it's one of the *rare* cases in which we use a Python
> "magic-syntax-ism" (like operator overloading, for instance) in the
> framework, plus the fact that, what, *every* other piece of QuerySet
> functionality uses a method. It seems bolted on.

In a way this feels like the same sort of debate as the one over
whether to implement __nonzero__() as a way of checking for an empty
QuerySet, or to use a dedicated exists() method; going one way is more
"Pythonic", going the other way is more "SQL-ish". I'd prefer to stick
to one way to do things, and probably it'd be a good idea to have a
design discussion about which way Django will lean on these issues.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

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

Reply via email to