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.

Author Robert.Burke
Recipients Robert.Burke
Date 2011-04-16.05:29:53
SpamBayes Score 0.00016427267
Marked as misclassified No
Message-id <1302931795.31.0.443472549499.issue11854@psf.upfronthosting.co.za>
In-reply-to
Content
If you create a subclass of set but do not override __or__, __and__, __xor__, and __sub__, calling these functions will yield a new instance of your subclass.  The new instance will never have __init__ called on it.  Depending on what you expect __init__ to do, this can cause problems later on.

The simplest solution would be to make these functions work like list.__add__.  If you have two instances of some list subclass (foo and bar), type(foo.__add__(bar)) will just be list.
History
Date User Action Args
2011-04-16 05:29:55Robert.Burkesetrecipients: + Robert.Burke
2011-04-16 05:29:55Robert.Burkesetmessageid: <1302931795.31.0.443472549499.issue11854@psf.upfronthosting.co.za>
2011-04-16 05:29:53Robert.Burkelinkissue11854 messages
2011-04-16 05:29:53Robert.Burkecreate