Skip to content

Commit 670f000

Browse files
committed
Return tuple not list on error
COUNTRY_CODE_TO_REGION_CODE holds tuples, so ensure that a failure return is also an empty tuple for consistency.
1 parent 957596d commit 670f000

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/phonenumbers/phonenumberutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ def region_codes_for_country_code(country_code):
18291829
"""
18301830
regions = COUNTRY_CODE_TO_REGION_CODE.get(country_code, None)
18311831
if regions is None:
1832-
return []
1832+
return ()
18331833
else:
18341834
return regions
18351835

0 commit comments

Comments
 (0)