Push a new item to the stack.
(self, obj)
| 202 | return Proxy(_lookup) |
| 203 | |
| 204 | def push(self, obj): |
| 205 | class="st">""class="st">"Push a new item to the stack."class="st">"" |
| 206 | rv = getattr(self._local, &class="cm">#x27;stack', None) |
| 207 | if rv is None: |
| 208 | class="cm"># pylint: disable=assigning-non-slot |
| 209 | class="cm"># This attribute is defined now. |
| 210 | self._local.stack = rv = [] |
| 211 | rv.append(obj) |
| 212 | return rv |
| 213 | |
| 214 | def pop(self): |
| 215 | class="st">"""Remove the topmost item from the stack. |
no outgoing calls