On this page
  1. types.GeneratorType
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

types.GeneratorType

Prev: types.FunctionType | Up: types | Next: types.GenericAlias
Rel: types.AsyncGeneratorType, types.BuiltinFunctionType, types.BuiltinMethodType, types.CapsuleType
Ref: docs.python.org — types.GeneratorType
Tags: #public #python3 #stdlib #types


Import

import types
from types import GeneratorType

Signature & Overview

types.GeneratorType()

types.GeneratorType class.

Methods & Attributes

Usage

import types

g = (x for x in range(3))
assert isinstance(g, types.GeneratorType)

Gotchas

REPL Inspect

from types import GeneratorType
help(GeneratorType)

Linked from

Related notes