class_docstr: Test semantics.
class_docstr_tok: ["Test","semantics","."]
docstr: Test 'value' attribute of StopIteration exception
docstr_tok: ["Test","'value","'","attribute","of","StopIteration","exception"]
code: def test_value_attribute_of_StopIteration_exception(self):
      """
      Test 'value' attribute of StopIteration exception
      """
      trace = []
  
      def pex(e):
          trace.append("%s: %s" % (e.__class__.__name__, e))
          trace.append("value = %s" % (e.value,))
  
      e = StopIteration()
      pex(e)
      e = StopIteration("spam")
      pex(e)
      e.value = "eggs"
      pex(e)
      self.assertEqual(
          trace,
          [
              "StopIteration: ",
              "value = None",
              "StopIteration: spam",
              "value = spam",
              "StopIteration: spam",
              "value = eggs",
          ],
      )
  
imports: import unittest
  import inspect
  from test.support import captured_stderr, disable_gc, gc_collect
  from test import support
label_desc: Use image node_id 10 for calling the TestPEP380Operation obj's underlying member method code with example usage: obj.test_value_attribute_of_StopIteration_exception() without return types