Issue 1459733: sets.Set can't be subclassed (original) (raw)

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:16 admin set github: 43102
2006-03-28 02:37:28 rubyjoker create