Return a tuple of globals in the function.
(self)
| 207 | return self.__locals |
| 208 | |
| 209 | def get_globals(self): |
| 210 | """Return a tuple of globals in the function. |
| 211 | """ |
| 212 | if self.__globals is None: |
| 213 | glob = (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT) |
| 214 | test = lambda x: _get_scope(x) in glob |
| 215 | self.__globals = self.__idents_matching(test) |
| 216 | return self.__globals |
| 217 | |
| 218 | def get_nonlocals(self): |
| 219 | """Return a tuple of nonlocals in the function. |