Message44954
I don't know how desireable this feature is, but
I think that a better solution would be to add
a new parameter to warnings.warn(), instead of
reusing the old one.
Also, your description is wrong; when warn() in
your example is called with stacklevel -2, the
reported frame is m2.m21.f(). To get your result,
you have to call warn() with stacklevel -1.
I think that a better solution would be to add
a skipmodules='moduleprefix' parameter to the
warn() function. warn() would then simply look
for the first frame whose module name doesn't
start with this prefix.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:30:00 | admin | link | issue850482 messages |
2007-08-23 15:30:00 | admin | create | |
|