The locals and globals at the given depth of the stack frame.
"""
// Get the locals and globals from the stack frame
frame = inspect.stack()[level + 1][0]
// We return the full stack here, even if it contains a lot of stuff we are
// not interested in -- it is cheaper to later raise an error when we find
// a specific object with an incorrect type instead of going through this big
// list now to check the types of all objects
After Change
The locals and globals at the given depth of the stack frame.
"""
// Get the locals and globals from the stack frame
frame = inspect.currentframe()
for _ in xrange(level + 1):
frame = frame.f_back
// We return the full stack here, even if it contains a lot of stuff we are
// not interested in -- it is cheaper to later raise an error when we find
// a specific object with an incorrect type instead of going through this big
// list now to check the types of all objects