This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eric.smith, steven.daprano, thautwarm, vtheno athena
Date 2018-10-03.13:55:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think this is a bug that should be fixed. This is similar to how f-strings used to work: the generated byte code would call format(something-or-other), and if you'd defined a name "format" in your code it would fail.

Now admittedly "format" is more common than "AssertionError", but in any event I don't think assert should fail because of a name you happen to be using. That's a surprising action-at-a-distance, in my mind.

And I especially think that's true in the case of assert: when an assert fires, the last thing I want is something that I normally wouldn't have tested for causing me to not see what the assertion is.

And, I think a broader discussion on python-dev might be useful, too, in order to get more opinions.
Date User Action Args
2018-10-03 13:56:00eric.smithsetrecipients: + eric.smith, steven.daprano, thautwarm, vtheno athena
2018-10-03 13:55:59eric.smithsetmessageid: <>
2018-10-03 13:55:59eric.smithlinkissue34880 messages
2018-10-03 13:55:59eric.smithcreate