STINNER Victor <vstin...@python.org> added the comment:

More detail about the implementation. Currently, namespaces are accessed 
directly with C functions which expect to get an exact dict type: these 
functions are designed for performance, not to handle dict subclasses, on 
purpose.

Supporting dict subclasses first require to check if the namespace type is 
dict: that's the first performance overhead. Then new code should be added to 
handle subclasses: that's the additional maintenance burden. This code path 
should be tested, maintained, reviewed, etc.

The risk is also to forget to support subclasses in one function which would 
break the feature. Same problem is new code is added which doesn't support dict 
subclasses.

This feature is far from being free to implement. It's very expensive on 
multiple aspects.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32615>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to