Skip to content

Commit

Permalink
Fix documentation.
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
Michael Howitz authored Jun 21, 2019
1 parent 34b670e commit 9bdce5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/usage/basic_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ properly.
To use classes in Python 3
``__metaclass__`` must be set. Set it to ``type`` to use no custom metaclass.

To use ``for`` statements and comprehensions
``_getiter_`` must point to :func:`RestrictedPython.Eval.default_guarded_getiter` and
``_iter_unpack_sequence_`` must point to :func:`RestrictedPython.Guards.guarded_iter_unpack_sequence`.
To use ``for`` statements and comprehensions:
* ``_getiter_`` must point to an ``iter`` implementation. As an unguarded variant you might use
:func:`RestrictedPython.Eval.default_guarded_getiter`.

* ``_iter_unpack_sequence_`` must point to :func:`RestrictedPython.Guards.guarded_iter_unpack_sequence`.

To use ``getattr``
you have to provide an implementation for it.
Expand Down

0 comments on commit 9bdce5b

Please sign in to comment.