On Wednesday, April 1, 2015 at 2:56:31 AM UTC-4, jo wrote:
*session.query(Rischio.c.codice).select_from(Rischio).filter(Rischio.c.peso_gruppo
== '1') #**true*
*session.query(Rischio.c.codice).select_from(Rischio).filter(Rischio.c.peso_gruppo
== '0') #false*
I don't think that
Hi all,
While I changed some obsolete syntax as defined in
(https://www.python.org/dev/peps/pep-0008/)
like (is True instead of ==True) also False and None.
I realized that sqlalchemy do not support them
What can I do to avoid this behavior?
Hmm! in this case we must distinguish between the python syntax and the
sqlalchemy syntax.:-(
j
On 30/03/2015 12:37, Simon King wrote:
On Mon, Mar 30, 2015 at 10:59 AM, Jose Soares
jose.soa...@sferacarta.com wrote:
Hi all,
While I changed some obsolete syntax as defined in
there's this:
* import sqlalchemy as sa**
** sa.sql.null()**
**sqlalchemy.sql.elements.Null object at 0x7f8a70065c50**
** sa.sql.false()**
**sqlalchemy.sql.elements.False_ object at 0x7f8a6fb13050**
** sa.sql.true()**
**sqlalchemy.sql.elements.True_ object at 0x7f8a70065c50**
*
so, you can still
On Mon, Mar 30, 2015 at 10:59 AM, Jose Soares
jose.soa...@sferacarta.com wrote:
Hi all,
While I changed some obsolete syntax as defined in
(https://www.python.org/dev/peps/pep-0008/)
like (is True instead of ==True) also False and None.
I realized that sqlalchemy do not support them
What
why not just called it that way:
filter(Rischio.c.peso_gruppo.is_(True))
And it would be the same thing for None and False
And the opposite would be:
filter(not_(Rischio.c.peso_gruppo.is_(None)))
Le lun. 30 mars 2015 à 11:10, Jonathan Vanasco jonat...@findmeon.com a
écrit :
If
Yeah, this is a good solution. Thanks for the tip.
j
On 30/03/2015 16:33, Richard Gerd Kuesters | Pollux wrote:
there's this:
* import sqlalchemy as sa**
** sa.sql.null()**
**sqlalchemy.sql.elements.Null object at 0x7f8a70065c50**
** sa.sql.false()**
**sqlalchemy.sql.elements.False_ object at
If you're just worried about warnings in Flake8, you can turn them off
line-by-line:
filter(
Rischio.c.peso_gruppo == True # noqa
)\
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop