[Python-Dev] mmap feature or bug?

"Martin v. Löwis" martin at v.loewis.de
Sat Dec 18 23:47:29 CET 2004


Josiah Carlson wrote:
> Is mmap's inability to be subclassed a feature or bug?

No.

It's a missing feature: it's not a bug, because nobody says this should
work, and anybody trying will find out that it doesn't work, so nobody
is tricked into believing it should work. The mmap type is not even
documented; mmap.mmap is a function.

It's not a feature, because (atleast IMO) there would be nothing wrong
with making mmap.mmap a subclassable type.

> Is one's inability to use a = mmapinstance.__setslice__;a(1,2,'a') (and
> others) a feature or bug?

That is a bug. Slice assignments are supported, and so should
__setslice__.

Regards,
Martin


More information about the Python-Dev mailing list