We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since webassets.Environment already implements magic methods such as __getitem__, it would be nice if the class provided __contains__ as well:
webassets.Environment
__getitem__
__contains__
def __contains__(self, name): return name in self._named_bundles
This small feature comes in handy when iron-proofing against typos; it's also much more elegant than try...except KeyError: block.
try...except KeyError:
Thanks!
The text was updated successfully, but these errors were encountered:
49e180f
No branches or pull requests
Since
webassets.Environment
already implements magic methods such as__getitem__
, it would be nice if the class provided__contains__
as well:This small feature comes in handy when iron-proofing against typos; it's also much more elegant than
try...except KeyError:
block.Thanks!
The text was updated successfully, but these errors were encountered: