Odoo Help


How to shorten Python "and" statements? [Closed]

on 5/30/13, 5:40 AM 1,017 views

The Question has been closed for reason: off-topic or not relevant

Ray Carnes
on 07/21/2014 18:13:30


I have a looong statement of "and"'s, for example:

if this == that and this == that and this == that:
    do this

How to correctly break such statements into separate lines, to comply with PEP-8?

Marvin Taboada
On 7/21/14, 5:53 PM

From PEP -8

The preferred place to break around a binary operator is after the operator, not before it.

Anyway, I suggest you ask Python related questions in any of the Python Mailing Lists.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 5/30/13, 5:40 AM
Seen: 1017 times
Last updated: 3/16/15, 8:10 AM