Example #1
0
 class Region(NamedTuple):
     name: str
     num_packages: int
     package_cost: float
     number_of_units: List[int] = ParseList(
         fixed_length=counts.num_services)
     latencies: List[int] = ParseList(
         fixed_length=counts.num_countries)
Example #2
0
 class Provider(NamedTuple):
     name: str
     num_regions: int
     regions: List[Region] = ParseList(
         length_parameter='num_regions')
Example #3
0
 class Doc(NamedTuple):
     num_lines: int
     lines: List[Line] = ParseList(length_parameter='num_lines')
Example #4
0
 class Line(NamedTuple):
     items: List[str] = ParseList(
         length_callable=lambda: next(length_iter))
Example #5
0
 class Line(NamedTuple):
     length: int
     items: List[str] = ParseList(length_parameter='length')
Example #6
0
 class Line(NamedTuple):
     items: List[str] = ParseList(fixed_length=3)
Example #7
0
 class Project(NamedTuple):
     penalty: int
     country: str
     units_needed: List[int] = ParseList(
         fixed_length=counts.num_services)