Remove the top item from the stack and return it. If the stack is empty, return ``None``.
(self)
| 145 | return stack |
| 146 | |
| 147 | def pop(self) -> T | None: |
| 148 | """Remove the top item from the stack and return it. If the |
| 149 | stack is empty, return ``None``. |
| 150 | """ |
| 151 | stack = self._storage.get([]) |
| 152 | |
| 153 | if len(stack) == 0: |
| 154 | return None |
| 155 | |
| 156 | rv = stack[-1] |
| 157 | self._storage.set(stack[:-1]) |
| 158 | return rv |
| 159 | |
| 160 | @property |
| 161 | def top(self) -> T | None: |