New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 806361 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Findit] Generic TypedLists and TypedDicts where the type can be specified

Project Member Reported by lijeffrey@chromium.org, Jan 26 2018

Issue description

TypedList and TypedDict can be created, however to create one of a specific type a new class must be made for each,

e.g.

class ListOfInt(TypedList):
  _element_type = int

There should be a way to pass the type as an argument, e.g.

class ListOfType(TypedList):

  def __init__(self):
    super(ListOfType, self).__init__()
    self._element_type = type

However this fails generator_pipeine.CreateInputObjectInstance's validation functions.

There should be a way to create a typed list or typed dict that passes the validation functions.
 

Sign in to add a comment