pyro-ppl/pyro

Incorrect stack terminology in Poutine and minipyro.py

Open

#3.088 geöffnet am 13. Mai 2022

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (981 Forks)batch import
documentationhelp wanted

Repository-Metriken

Stars
 (8.211 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 19h) (1 gemergte PR in 30 T)

Beschreibung

The Poutine example page and the minipyro.py example script flip the standard terminology of the stack data structure. One adds and removes from the top of the stack, but in these pages this is flipped. As pedagogical resources, this inverted terminology adds unnecessary confusion.

For example, when iterating over the stack in minipyro.py:

PYRO_STACK is reversed so that effect handlers higher in the stack are first applied.

and in http://pyro.ai/examples/effect_handlers.html#Interlude:-the-global-Messenger-stack:

Messenger.__enter__ appends a Messenger to the end (the bottom) of the global handler stack

Contributor Guide