Skip to content

Commit

Permalink
Minor additions to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
scnerd committed Apr 25, 2018
1 parent e0ed25b commit 56ab606
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/collapse_literals.rst
Expand Up @@ -41,5 +41,8 @@ If a branch is constant, and thus known at decoration time, then only the correc
x = 2
return 2

This decorator is actually very powerful, understanding any definition-time known collections, primitives, or even dictionaries. Subscripts are resolved if the list or dictionary, and the key into it, can be resolved. Names are replaced by their values if they are not containers (since re-writing a container, such as a tuple or list, could duplicate object references). Functions, such as ``len`` and ``sum`` can be computed and replaced with their value if their arguments are known.

.. todo:: Always commit changes within a block, and only mark values as non-deterministic outside of conditional blocks
.. todo:: Support list/set/dict comprehensions
.. todo:: Attributes are too iffy, since properties abound, but assignment to a known index of a known indexable should be remembered

0 comments on commit 56ab606

Please sign in to comment.