Odoo Help

0

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

By
Antanas
on 5/30/13, 5:40 AM 609 views

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

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

Hello,

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?

0
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.

Register

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)

Stats

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