sys exc_info(function the following read-only attributes are available in traceback objectsattribute description tb_next next level in the stack trace (toward the execution frame where the exception occurredexecution frame object of the current level line number where the exception occurred instruction being executed in the current level tb_frame tb_lineno tb_lasti generator objects generator objects are created when generator function is invoked (see "functions and functional programming" generator function is defined whenever function makes use of the special yield keyword the generator object serves as both an iterator and container for information about the generator function itself the following attributes and methods are availableattribute description code object for the generator function execution frame of the generator function integer indicating whether or not the generator function is currently running next(execute the function until the next yield statement and return the value (this method is called _next_ in python send(valuesends value to generator the passed value is returned by the yield expression in the generator that executes until the next yield expression is encountered send(returns the value passed to yield in this expression close(closes generator by raising generatorexit exception in the generator function this method executes automatically when generator object is garbage-collected throw(exc [,exc_value raises an exception in generator at the point of the [,exc_tb ]]current yield statement exc is the exception typeexc_value is the exception valueand exc_tb is an optional traceback if the resulting exception is caught and handledreturns the value passed to the next yield statement gi_code gi_frame gi_running slice objects slice objects are used to represent slices given in extended slice syntaxsuch as [ : :stride] [ :jn: ]or ai:jslice objects are also created using the built-in slice([ , [,stride]function the following read-only attributes are availablef lib fl ff