On Wed, 3 Oct 2018 at 19:39, Benjamin Peterson wrote:
>
>
> On Wed, Oct 3, 2018, at 08:59, Steven D'Aprano wrote:
> > On the bug tracker, there's a discussion about the current behaviour of
> > the assert statement, where shadowing AssertionError will change the
> > behaviour of the assertion.
>
On Wed, Oct 3, 2018, at 08:59, Steven D'Aprano wrote:
> On the bug tracker, there's a discussion about the current behaviour of
> the assert statement, where shadowing AssertionError will change the
> behaviour of the assertion.
>
> https://bugs.python.org/issue34880
>
> Currently, assert do
On Thu, 4 Oct 2018 01:59:37 +1000
Steven D'Aprano wrote:
> On the bug tracker, there's a discussion about the current behaviour of
> the assert statement, where shadowing AssertionError will change the
> behaviour of the assertion.
>
> https://bugs.python.org/issue34880
>
> Currently, assert d
Feels like an accident to me. Generally syntactic constructs should be
unaffected by what's in any namespace except when the override is
intentional (e.g. __import__).
On Wed, Oct 3, 2018 at 9:02 AM Steven D'Aprano wrote:
> On the bug tracker, there's a discussion about the current behaviour of
On the bug tracker, there's a discussion about the current behaviour of
the assert statement, where shadowing AssertionError will change the
behaviour of the assertion.
https://bugs.python.org/issue34880
Currently, assert does a LOAD_GLOBAL on AssertionError, which means if
you shadow the name