On Sun, Nov 3, 2013 at 5:13 PM, Cody Scott <[email protected]> wrote:

> 3
> Why do Q objects use '&', '|' and '~' for AND, OR and NOT when python uses
> 'and', 'or' and 'not'?
> source<https://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects>
>

Because Python actually does use &, | and ~.

See the following links for more info:
https://wiki.python.org/moin/BitwiseOperators
http://en.wikipedia.org/wiki/Bitwise_operation
http://docs.python.org/3.4/library/operator.html#mapping-operators-to-functions



Cheers,
AT

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAKBiv3zUHz49MDjUYyuRidx_xp0uX8bmeLY8SkY%3DqgLLXigzjg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to