Thanks Anthony ... I'm sorry say but can not remember for what i
needed that code snippet thanks any way.. is good to know that
stuff.
2016-09-16 17:02 GMT-04:00 Anthony :
> This is a quirk of Field objects. Field inherits from Expression, and the
> __eq__ method of Expression returns a Quer
This is a quirk of Field objects. Field inherits from Expression, and the
__eq__ method of Expression returns a Query object (rather than testing for
equality and returning a boolean). So, if you do something like myfield ==
some_object, you do not actually get a test of whether myfield is
equi
On Friday, September 16, 2016 at 9:41:28 AM UTC-7, Yoel Benitez Fonseca
wrote:
>
> Does this make sense to you?
>
Yes.
>
> In [1]: fields = list()
>
> In [2]: f = db.item.id
>
> In [3]: f in fields
> Out[3]: False
>
> In [4]: fields.append(f)
>
> In [5]: f in fields
> Out[5]: True
>
3 matches
Mail list logo