Ofer Schwarz added the comment:
There's actually no advantage for a weakref here, since the exception object
already holds an indirect reference to all the raising frame's locals through
__traceback__.
--
nosy: +blackfawn
___
Python tracker
Antoine Pitrou added the comment:
Thanks for the analysis. Closing then!
--
nosy: +pitrou
resolution: - rejected
stage: test needed - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18166
Ofer Schwarz added the comment:
So, this is actually impossible to do.
Since exceptions are c-level classes, adding members to ValueError means
anything that multiple-inherits from ValueError and any other complex exception
gets a multiple bases layout conflict. There's already one such class
Mark Lawrence added the comment:
Just a gentle reminder guys.
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18166
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18166
___
___
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18166
___
___
Python-bugs-list
New submission from Brett Cannon:
A 'value attribute for ValueError could store a weakref to the value which
triggered the exception. It should be a weakref so at to prevent accidental
prevention of GC of the value.
--
components: Interpreter Core
messages: 190781
nosy: brett.cannon
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18166
___
___
Python-bugs-list mailing