Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
r = Regions(outlines)
"""
super(Regions, self).__init__()
if numbers is None:
numbers = range(len(outlines))
if not _is_numeric(numbers):
raise ValueError("'numbers' must be numeric")
outlines = _maybe_to_dict(numbers, outlines)
names = _sanitize_names_abbrevs(numbers, names, "Region")
abbrevs = _sanitize_names_abbrevs(numbers, abbrevs, "r")
regions = dict()
for n in numbers:
regions[n] = _OneRegion(n, names[n], abbrevs[n], outlines[n])
self.regions = regions
self.name = name
self.source = source
# arguments are now optional
r = Regions(outlines)
"""
super(Regions, self).__init__()
if numbers is None:
numbers = range(len(outlines))
if not _is_numeric(numbers):
raise ValueError("'numbers' must be numeric")
outlines = _maybe_to_dict(numbers, outlines)
names = _sanitize_names_abbrevs(numbers, names, "Region")
abbrevs = _sanitize_names_abbrevs(numbers, abbrevs, "r")
regions = dict()
for n in numbers:
regions[n] = _OneRegion(n, names[n], abbrevs[n], outlines[n])
self.regions = regions
self.name = name
self.source = source