New submission from Calvin: I noticed some odd behaviour on classes defining __setitem__. Using del on a class defining __setitem__ but not __delitem__ results in "AttributeError: __delitem__". On classes definig neiter __setitem__ nor __delitem__ on the other hand this results in "TypeError: 'WithoutSetItem' object doesn't support item deletion".
See the appended example script. ---------- files: delitem_example.py messages: 300346 nosy: raumzeitkeks priority: normal severity: normal status: open title: del expects __delitem__ if __setitem__ is defined type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47085/delitem_example.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31218> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com