On Feb 10, 7:38 am, David Abrahams <[EMAIL PROTECTED]> wrote:
> Trying to take the temperature here: is there any sympathy here for
> the idea of adding it to contrib/, or is the whole idea simply
> anathema to this group?
For me, the idea looks great. I will not hold my breath waiting it to
be
On Feb 10, 5:38 am, David Abrahams <[EMAIL PROTECTED]> wrote:
> "James Bennett" <[EMAIL PROTECTED]>
> writes:
> Can't argue with your subjective opinion. But I suggest you ask some
> newbies what they think. Also, "prettiness" is not really one of my
> goals, though I believe that generally come
"Karen Tracey" <[EMAIL PROTECTED]>
writes:
> "Karen Tracey" <[EMAIL PROTECTED]>
> writes:
> > The fix for #2348 changes the error from "Unbound local error" to "Type
> error: cannot
> resolve
> > keyword [whatever] into field".
>
> Illustrating just why the current sy
On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote:
>
>
> "Karen Tracey" <[EMAIL PROTECTED]>
> writes:
> > The fix for #2348 changes the error from "Unbound local error" to "Type
> error: cannot resolve
> > keyword [whatever] into field".
>
> Illustrating just why the current syntax is hard to gi
"Adrian Holovaty" <[EMAIL PROTECTED]>
writes:
> On 2/9/07, David Abrahams <[EMAIL PROTECTED]> wrote:
>> Entry.objects.filter(
>> _.headline.startswith('What') &
>> ~(_.pub_date>=datetime.now()) &
>> _.pub_date>=datetime(2005, 1, 1))
>
> David,
>
> Looks like you don't like
"Karen Tracey" <[EMAIL PROTECTED]>
writes:
> On 2/9/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> However, you have obviously been bitten by a bad error message - I
> would suggest that a good course of action would be to raise a ticket
> with your specific example so that th
On 2/9/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
>
> However, you have obviously been bitten by a bad error message - I
> would suggest that a good course of action would be to raise a ticket
> with your specific example so that the error reporting of that part of
> the query engine can
On 2/9/07, David Abrahams <[EMAIL PROTECTED]> wrote:
> Entry.objects.filter(
> _.headline.startswith('What') &
> ~(_.pub_date>=datetime.now()) &
> _.pub_date>=datetime(2005, 1, 1))
David,
Looks like you don't like Django's database API. Sorry you don't like
it, but we can
"James Bennett" <[EMAIL PROTECTED]>
writes:
> First thoughts: subjectively, I'm not sure it'd be any prettier than
> what we have now.
Can't argue with your subjective opinion. But I suggest you ask some
newbies what they think. Also, "prettiness" is not really one of my
goals, though I belie
First thoughts: subjectively, I'm not sure it'd be any prettier than
what we have now. I'm also wary of overloading the concepts of the
standard Python operators when whet we're really doing is translating
to SQL operations -- sooner or later, there's going to be an impedance
mismatch.
I'm also n
Malcolm Tredinnick <[EMAIL PROTECTED]>
writes:
> On Fri, 2007-02-09 at 21:14 -0500, David Abrahams wrote:
>> _.foo >= 6 returns an expression tree, an object that represents
>> the comparison of the foo field with 6. This technique is well-known
>> among advanced C++ programmers but has also be
On Fri, 2007-02-09 at 21:14 -0500, David Abrahams wrote:
> Malcolm Tredinnick <[EMAIL PROTECTED]>
> writes:
[...]
> > Maybe I'm missing something, but I don't see how this can work at all.
> > When Python sees "_.foo >= 6", it is going to evaluate it at runtime
> > (before calling the function).
"Lawrence Oluyede" <[EMAIL PROTECTED]>
writes:
>> > ---
>> > from django.models import field as _
>> >
>> > Entry.objects.filter(
>> > _.headline.startswith('What')).exclude(
>> > _.pub_date>=datetime.now()).filter(
>> > _.pub_date>=datetime(2005, 1, 1))
>>
>> Should b
> > ---
> > from django.models import field as _
> >
> > Entry.objects.filter(
> > _.headline.startswith('What')).exclude(
> > _.pub_date>=datetime.now()).filter(
> > _.pub_date>=datetime(2005, 1, 1))
>
> Should be:
>
> Entry.objects.filter(
> _.headline.startswith(
Malcolm Tredinnick <[EMAIL PROTECTED]>
writes:
> On Sat, 2007-02-10 at 08:30 +0800, Russell Keith-Magee wrote:
>> On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote:
>> >
>> >Use natural operators for filtering, excluding, and attribute
>> >access.
>>
>> > How about it?
>>
>> Some imm
"Russell Keith-Magee"
<[EMAIL PROTECTED]> writes:
> On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote:
>>
>>Use natural operators for filtering, excluding, and attribute
>>access.
>
>> How about it?
>
> Some immediate problems:
>
> - Your syntax works for < > <= >= and ==; but what abo
On Sat, 2007-02-10 at 08:30 +0800, Russell Keith-Magee wrote:
> On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote:
> >
> >Use natural operators for filtering, excluding, and attribute
> >access.
>
> > How about it?
>
> Some immediate problems:
>
> - Your syntax works for < > <= >= an
On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote:
>
>Use natural operators for filtering, excluding, and attribute
>access.
> How about it?
Some immediate problems:
- Your syntax works for < > <= >= and ==; but what about all the other
Django query operators? How do you come up with
David Abrahams
<[EMAIL PROTECTED]> writes:
> ---
> from django.models import field as _
>
> Entry.objects.filter(
> _.headline.startswith('What')).exclude(
> _.pub_date>=datetime.now()).filter(
> _.pub_date>=datetime(2005, 1, 1))
Should be:
Entry.objects.filter(
What's wrong with this picture?
TimeDivision.objects.filter(when__ge=datetime(2007,5,14))
Whoops. "Greater or equal" is spelled 'gte' and not 'ge' in Django's
model API. After having fallen into this trap and getting a cryptic
error message (UnboundLocalError: local variable 'new_opts' refer
20 matches
Mail list logo