Would it be too verbose to display two frames or more by default?
Maybe depending on the action (ex: only if the warning is emitted only
once).

Victor

2015-09-20 8:44 GMT+02:00 Serhiy Storchaka <storch...@gmail.com>:
> For now the default value of the stacklevel parameter in warnings.warn() is
> 1. But in most cases stacklevel=2 is required, sometimes >2, and I don't
> know cases that need stacklevel=1. I propose to make the default value of
> stacklevel to be 2. I think that unlikely this will break existing code. But
> rather can fix existing bugs. If stacklevel=1 is required (I don't know
> cases), it can be explicitly specified.
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to