Skip to content

Conversation

@akx
Copy link
Contributor

@akx akx commented Mar 31, 2025

This will avoid an extra dict lookup in the "misconfigured" case; try: except: is zero-cost in Python 3.11+.

These are both pretty hot paths, so a small optimization goes a long way.

@MrBin99
Copy link
Owner

MrBin99 commented May 9, 2025

Yeah I see that but we support older versions of Python and I don't want to add costs of exceptions for people using older versions of Python. I don't know if for older versions the cost will be huge or not to have exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants