pyro-ppl/pyro

Incorrect stack terminology in Poutine and minipyro.py

開放

#3,088 建立於 2022年5月13日

 (2 則留言) (0 個反應) (0 位負責人)Python (981 個分叉)batch import
documentationhelp wanted

倉庫指標

星標
 (8,211 顆星)
PR 合併指標
 (平均合併 10天 19小時) (30 天內合併 1 個 PR)

描述

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

貢獻者指南