Odoo Help


This community 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.


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

on 5/30/13, 5:40 AM 572 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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