Bugs item #1221477, was opened at 2005-06-15 12:46 Message generated for change (Comment added) made by agthorr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1221477&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: Documentation Group: None Status: Closed Resolution: Invalid Priority: 5 Submitted By: Daniel Stutzbach (agthorr) Assigned to: Nobody/Anonymous (nobody) Summary: Incorrect documentation for InPlace Number operators Initial Comment: The documentation for the various InPlace abstract number operators (PyNumber_InPlaceSubtract, etc.) specify that the functions return a new reference. Unless I'm mistaken, this is incorrect. The functions do not increment increment the reference counter. ---------------------------------------------------------------------- >Comment By: Daniel Stutzbach (agthorr) Date: 2005-06-15 14:29 Message: Logged In: YES user_id=6324 How are the InPlace versions different from the regular versions, then? I do remember something about number objects in Python being immutable, so what you say makes sense. I'm just not sure if I need to be decrementing any reference counters when I'm trying to do the equivalent of "a += b". Perhaps adding some text to the top of that section describing what "in-place" means in this context? ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2005-06-15 14:15 Message: Logged In: YES user_id=80475 Actually, they do. Arithmetic operations create new number objects. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1221477&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com