[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: @eli.bendersky: The article is awesome. One of the cases when I regret that many interesting Python posts don't have a +1 button. One more chapter about C stack overflow and it will get all top hits. ;) -- ___ Py

[issue17494] References to stack bottom are confusing

2013-03-21 Thread Eli Bendersky
Eli Bendersky added the comment: I actually find the growth direction confusing sometimes for the same reasons (too much x86 assembly). This is why I wrote this blog post a while back - mainly so I can always look at it and de-confuse myself: http://eli.thegreenplace.net/2011/02/04/where-the-t

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: It appeared that I always thought that stacks grow down towards the end of memory, but it appears that they are growing down towards the beginning (x86 and friends). Spent some years with assembly to miss that. A shame on me. =) Even if title of the issue i

[issue17494] References to stack bottom are confusing

2013-03-21 Thread Eli Bendersky
Eli Bendersky added the comment: Top/bottom is accepted and understood nomenclature when talking about stacks. Think about a stack of plates in the kitchen. You put a new plate on top, you take it out from top. That's it. Now, lists are just one way to implement stacks, and printing them is al

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: +or None if this is the first frame (at the bottom of the stack); I'd avoid top/bottom altogether, but if it is what is needed to reach the consensus then I am fine with that. -- ___ Python tracker

[issue17494] References to stack bottom are confusing

2013-03-21 Thread Ezio Melotti
Ezio Melotti added the comment: Using "first" makes some sense, since it's talking about "previous", but I agree it might be confused with the top frame too. What about this wording then: -f_back is to the previous stack frame (towards the caller), -or None if this is the bottom stack frame; +

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: stack = [] stack.append(item) stack.append(item) stack.append(item) This is an appropriate explanation of the stack in Python, the first frame is the frame that was put in first. root/terminal - if you know what a stack is, you won't confuse it with a tree

[issue17494] References to stack bottom are confusing

2013-03-20 Thread Georg Brandl
Georg Brandl added the comment: Sorry, I find your suggested termini more confusing. * first/last: the first that was put onto the stack (i.e. bottom) or the first to be popped off (i.e. top)? * root/terminal: that makes you think of trees, but a stack is not a tree. top/bottom is the establi

[issue17494] References to stack bottom are confusing

2013-03-20 Thread anatoly techtonik
New submission from anatoly techtonik: If stack is saved in list and printed to the screen, it will be printed as: [ root, second, last ] And the last elements is the bottom element. The documentation at http://docs.python.org/3/reference/datamodel.html#frame-objects refers "bottom eleme