<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 24, 2018 at 2:21 AM, Victor Stinner <span dir="ltr"><<a href="mailto:vstinner@redhat.com" target="_blank">vstinner@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Even if the C language allows assignments in if, I avoid them, because<br>
I regularly have to debug my own code in gdb ;-)<br></blockquote><div><br></div><div>I personally haven't written a lot of C, so have no personal experience, but if this is at all a common approach among experienced C developers, it tells us a lot.</div><div><br></div><div>We shouldn't add a feature that people would make a point of avoiding!</div><div><br></div><div>OT note:</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now the question is which Python are allowed for babies. I recall that<br>
a colleague was surprised and confused by context managers. Does it<br>
mean that try/finally should be preferred?</blockquote><div><br></div><div>well, no, because try ... finally is even more confusing -- at least that's the impression I get from spending 20 minutes on it with newbies in my class last night :-)</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Or metaclasses?</blockquote><div><br></div><div>metaclasses are well known to be advanced juju -- they should not (and probably don't) show up in everyday code. Even if they are used in everyday code, the use is usually hidden -- i.e. when a user subclasses from an ORM model class, they are using metaclasses, but they don't have to know that.</div><div><br></div><div>That is -- they fall into the category of stuff that should only be used by library/framework developers -- and, in fact, the whole point is to make everyday code easier.</div><div><br></div><div>In fact, the number of developers that need to write/debug metaclasses, context managers, decorators, is far fewer than the number of folks that USE those things. So the standards are very different.</div><div><br></div><div>-CHB</div><div><br></div><div><br></div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>