Skip to content

Commit

Permalink
fix readme blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
danthedeckie committed Oct 28, 2024
1 parent ba1a3ec commit 0da83da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,14 @@ There is an additional layer of protection you can add in by passing in ``allowe
makes all attribute access based opt-in rather than opt-out - which is a lot safer design:

.. code-block:: pycon
>>> simpleeval("' hello '.strip()", allowed_attrs={})
will throw FeatureNotAvailable - as we've now disabled all attribute access. You can enable some
reasonably sensible defaults with BASIC_ALLOWED_ATTRS:

.. code-block:: pycon
>>> from simpleeval import simpleeval, BASIC_ALLOWED_ATTRS
>>> simpleeval("' hello '.strip()", allowed_attrs=BASIC_ALLOWED_ATTRS)
Expand Down

0 comments on commit 0da83da

Please sign in to comment.