<div dir="ltr">Maybe this would be a good subject for a series of blog posts? There is certainly plenty we have to say based on 20+ years of experience adding stuff to the stdlib (and not adding it).<br></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Sat, Mar 15, 2014 at 8:55 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">On 16 March 2014 01:40, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
> On Sat, Mar 15, 2014 at 4:02 AM, Giampaolo Rodola' <<a href="mailto:g.rodola@gmail.com">g.rodola@gmail.com</a>><br>
> wrote:<br>
><br>
</div><div class="">> This downside of using subclassing as an API should be well known by now and<br>
> widely warned against.<br>
<br>
</div>I've actually pondered the idea of suggesting we explicitly recommend<br>
the "procedural facade around an object oriented implementation" API<br>
design model in PEP 8, but it's not really a *coding* style guide<br>
issue, and I also haven't been able to come up with a good way of<br>
summarising it.<br>
<br>
That said, should we perhaps start codifying some of these principles<br>
as a "standard library API design guide"? We have a few additional<br>
issues to take into account that most software can ignore, like<br>
"assume that users that already know Python may be using the module<br>
and its documentation to learn a new domain, rather than the other way<br>
around, where a domain expert is just using the module to get things<br>
done". (That was the main driver for the differences between ipaddr<br>
and the accepted ipaddress API). The question about whether or not to<br>
add new boolean flags vs adding new APIs also comes up fairly often.<br>
<br>
At the moment, there's no real way for newcomers to pick up those<br>
principles other than hanging around long enough to see them come up<br>
again.<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
Nick.<br>
<br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)
</div>