Paul Moore wrote:
> My point was that as far as I am aware,
> Guido's current position on ABCs is that they are, and will remain,
> optional - people like myself (and Greg, from the sound of it) who
> don't want to derive from ABCs will not be penalised by being excluded
> from anything in the Python core or the stdlib.

Maybe not in the core or stdlib, but it seems like
there will be cases where one *is* penalised for
not using the ABCs, if they get used the way the
PEP proposes.

 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. 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.

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.

--
Greg
_______________________________________________
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

Reply via email to