Hi!
I have a question about style. In PEP-8, it says don't exceed 79
characters, but can this rule ever be trumped by
readability?
Eg.
if someobject.filter(something) \
.filter(somethingreallyreallyreallyreallylong ==
somethingelsereallyreallylong) \
.filter(othethingreallylongreallyreally ==
ternarythingreallyreallyreallylong) \
.filter(thirdthingreallylessreallymaybelong ==
thirdotherthingreallylong) \
.first():
< do something >
if someobject.filter(something) \
.filter(somethingreallyreallyreallyreallylong == \
somethingelsereallyreallylong) \
.filter(othethingreallylongreallyreally == \
ternarythingreallyreallyreallylong ) \
.filter(thirdthingreallylessreallymaybelong == \
thirdotherthingreallylong) \
.first():
< do something >
The first example is more readable to me but violates the 80 character
rule. The second is less readable, but doesn't violate
the 80 character rule.
Is there a guideline or convention that pythonistas follow about this style
case?
Thanks,
Tino
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor