On 4/25/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > From the PEP, it seems there are two purposes for > these proposed ABCs: > > 1) To document what is meant when we say that something > is a "sequence", "mapping", etc. > > This could be done simply by writing documentation. There > is no need for anything embodied in the language. > > 2) To mark a class for the purposes of introspection. > > I thought we had generally agreed that this is an > anti-pattern in Python.
Then how do you explain the popularity of zope.interfaces in both the Zope and the Twisted world? While it often is an anti-pattern, it isn't always, and I don't see why we should forever have to tell people who need this functionality "go download this obfuscated piece of 3rd party code." > If I want my object to > interoperate with someone else's code that tests for > the presence of some ABC, then I *am* forced to use > that ABC, even if it doesn't entirely suit my > purposes. No different than if you want to interoperate with someone who uses zope.interfaces, except you won't have to use 3rd party code, so the cost to you of conforming is many times lower. > I'm -1 on including anything in the language, stdlib > or docs that appears to officially sanction type > testing as a normal style of programming. Read PEP 3119's Rationale. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com