[New-bugs-announce] [issue4357] frozen?set operations create incorrectly initialized instances of subclasses
Alex Samuel
report at bugs.python.org
Wed Nov 19 18:41:28 CET 2008
New submission from Alex Samuel <alex at alexsamuel.net>:
Methods of set and frozenset that return new set or frozenset instances
return instances of subclasses, but these instances are not initialized
correctly. In the attached code sample, z is an instance of MySet but
MySet.__new__ and MySet.__init__ are never called on it.
It seems to me that such a method should return a fully-initialized
instance of the subclass. Barring that, it should just return a set or
frozenset instance, not an instance of the subclass.
----------
assignee: theller
components: ctypes
files: fs.py
messages: 76062
nosy: alexhsamuel, theller
severity: normal
status: open
title: frozen?set operations create incorrectly initialized instances of subclasses
type: behavior
versions: Python 2.5, Python 3.0
Added file: http://bugs.python.org/file12062/fs.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4357>
_______________________________________
More information about the New-bugs-announce
mailing list