The previous implementation of `use_calculator` relied on a character whitelist to sanitize expressions before passing them to `eval`. This approach is brittle and can be bypassed.
This commit introduces two improvements:
1. The character whitelist check is now performed using a set for faster lookups.
2. A check has been added to explicitly disallow the use of double underscores (`__`) in expressions, which is a common vector for accessing sensitive attributes and methods in Python.
While this is not a complete solution for safely evaluating mathematical expressions, it significantly hardens the `use_calculator` function against common `eval` exploits.