This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sets.Set can't be subclassed
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, rubyjoker, zseil
Priority: normal Keywords:

Created on 2006-03-28 02:37 by rubyjoker, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sets_error rubyjoker, 2006-03-28 02:37 Session log showing an error.
sets_data.patch rubyjoker, 2006-03-28 03:02
Messages (4)
msg27905 - (view) Author: Michal Kwiatkowski (rubyjoker) Date: 2006-03-28 02:37
sets.Set class fail to hide its implementation. 
Subclassing it and overriding __init__ causes an 
exception during object creation.
msg27906 - (view) Author: Michal Kwiatkowski (rubyjoker) Date: 2006-03-28 02:41
Logged In: YES 
user_id=1310227

I'm posting a proposed patch with a test case covering this 
bug (shouldn't all standard library modules have tests?). It 
may introduce performance lost, as it removes __slots__ 
definition.
msg27907 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-03-28 06:33
Logged In: YES 
user_id=1326842

This is a bug in your code, you have to call
the base class's __init__ method. The error
does not occur during the object creation,
but later when repr(obj) fails due to incorrect
initialization.
msg27908 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-03-28 07:48
Logged In: YES 
user_id=849994

Ziga is correct, this is Invalid.
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43102
2006-03-28 02:37:28rubyjokercreate