[Python-Dev] proto-pep: plugin proposal (for unittest) (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Sat Jul 31 03:35:29 CEST 2010


On Sat, Jul 31, 2010 at 12:34 AM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:

Explicit registration over implicit registration by subclassing is an interesting discussion, but I like the simplicity provided by just subclassing.

Note that ABCs are deliberately designed to let users choose to do either. Subclassing gets you better implementation support (since you pick up all the concrete method implementations "for free"), but you can still use explicit registration if you have an existing class that provides the API but isn't a subclass of the ABC.

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list