<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2015-07-17 14:01 GMT+01:00 Davide Muzzarelli <span dir="ltr"><<a href="mailto:d.muzzarelli@dav-muz.net" target="_blank">d.muzzarelli@dav-muz.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":1ec" class="" style="overflow:hidden">Il motivo è che il primo if controlla anche il tipo mentre gli altri due no.</div></blockquote><div><br></div><div>In realta' il primo e' anche il piu' broken. Dalla PEP8:</div><div><br></div><ul style="margin:0px 0px 1.3125em 1.5em;padding:0px;border:0px;font-family:SourceSansProRegular,Arial,sans-serif;font-size:15px;font-stretch:inherit;line-height:1.875;vertical-align:baseline;list-style:square;color:rgb(68,68,68);background-color:rgb(249,249,249)"><li style="margin:0.2625em 0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.65em;vertical-align:baseline"><p class="" style="margin:0px 0px 1.3125em;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.875;vertical-align:baseline">Don't compare boolean values to True or False using <tt class="">== </tt>.</p><pre class="" style="margin-top:0px;margin-bottom:1.3125em;padding:0.5em;border:0px;font-family:Consolas,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.875;vertical-align:baseline;white-space:pre-wrap;word-wrap:break-word;background:inherit">Yes: if greeting:
No: if greeting == True:
Worse: if greeting is True:</pre></li></ul><div><font color="#444444" face="Consolas, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="font-size:15px;line-height:28.125px;white-space:pre-wrap"><br></span></font></div><div><font color="#444444" face="Consolas, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="font-size:15px;line-height:28.125px;white-space:pre-wrap"><br></span></font></div><div><font color="#444444" face="Consolas, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="font-size:15px;line-height:28.125px;white-space:pre-wrap"><br></span></font></div><div> </div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"> .<br>..: -enrico-</div>
</div></div>