2008/9/2 Greg Ewing <<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>>:<br>> Steven D'Aprano wrote:<br>>><br>>> Why not expose the class directly, instead of making it private and then exposing it via a factory function that does nothing else?<br>
><br>> This option would also have the advantage of not<br>> changing the API (unless there's code out there that<br>> actually depends on them *not* being classes, and<br>> that seems rather unlikely).<br>
<br>No. Allowing them to be subclassed makes it harder to replace them on some platforms with equivalent but faster implementations.<br><br>-- <br>--Guido van Rossum (home page: <a href="http://www.python.org/~guido/">http://www.python.org/~guido/</a>)<br>
<br>