Patches item #1512942, was opened at 2006-06-26 15:47 Message generated for change (Comment added) made by collinwinter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1512942&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core (C code) Group: Python 2.5 >Status: Closed >Resolution: Rejected Priority: 3 Private: No Submitted By: Alexander Belopolsky (belopolsky) Assigned to: Nobody/Anonymous (nobody) Summary: Improves an error message from setattr Initial Comment: Fixes Bugs item #1506776 ---------------------------------------------------------------------- >Comment By: Collin Winter (collinwinter) Date: 2007-03-08 22:30 Message: Logged In: YES user_id=1344176 Originator: NO Since no-one has been able to come up with a simple fix or a better error message, and since the referenced bug report was closed eight months ago, I'm closing this patch, too. ---------------------------------------------------------------------- Comment By: Alexander Belopolsky (belopolsky) Date: 2006-06-29 14:07 Message: Logged In: YES user_id=835142 I did not think of the that case. It looks like there is no easy way to distinguish the slots and no slots case in PyObject_GenericSetAttr. I think the proper fix will involve not filling tp_setattro with PyObject_GenericSetAttr in the presence of slots, but use a function that is optimized for that case. Can anyone suggest a simpler fix? ---------------------------------------------------------------------- Comment By: Armin Rigo (arigo) Date: 2006-06-28 06:36 Message: Logged In: YES user_id=4771 The error message can still be wrong. For example, in the following situation: class X(object): __slots__ = ['a'] X().b = 5 Then the original message -- no attribute 'b' -- was correct. With this patch Python now wrongly tells you that 'X' object has only read-only attributes. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1512942&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches