A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2008-May/079780.html below:

[Python-Dev] ABC issues

[Python-Dev] ABC issues [Python-Dev] ABC issuesRaymond Hettinger python at rcn.com
Tue May 27 01:11:30 CEST 2008
From: "Armin Ronacher" <armin.ronacher at active-4.com>
> If the ABCs exists only for forward compatibility they will be mostly useless
> for every day usage.  

The Mapping ABC is still useful as a mixin in code that will run
on both 2.6 and 3.0.  It is the easiest way to start coding with views.


>> Deque's do not support count(), insert() or __iadd__().
>> They should not be registered.  

> If it doesn't implement the MutableSequence protocol it still is a Sized
> container.  However currently it's not registered as a container.

Seems useless to me.  I don't think the intent of the ABC pep was
to mandate that every class that defines __len__ must be registered
as Sized. 

> Another issue is that builtin types don't accept ABCs currently.  For example
> set() | SomeSet() gives a TypeError, SomeSet() | set() however works.

Pandora's Box -- sure you want to open it?


Raymond
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4