Message89284
Perhaps the C implementation should interpret the stacklevel parameter
differently so that it is compatible with the Python implementation.
The stacklevel value is, after all, a very important part of the
interface of warnings.warn, as it is the only way to direct the warning
at a piece of code.
If the C implementation doesn't add a frame to the stack, then maybe it
should special case stacklevel=0 (eg, pointing somewhere arbitrary, not
real, and obviously so). It seems that it already accounts for this
fact for other stacklevel values, as it doesn't exhibit the obvious
off-by-one error one might expect.
Or, close this ticket as won't-fix, if there is no intention of ever
fixing it. |
|
Date |
User |
Action |
Args |
2009-06-12 15:47:18 | exarkun | set | recipients:
+ exarkun, brett.cannon, benjamin.peterson |
2009-06-12 15:47:18 | exarkun | set | messageid: <1244821638.54.0.356637064352.issue4182@psf.upfronthosting.co.za> |
2009-06-12 15:47:17 | exarkun | link | issue4182 messages |
2009-06-12 15:47:17 | exarkun | create | |
|