[Pkg-isocodes-devel] [pkg-isocodes-Bugs][313369] Space delimiters in ISO-3166-2 codes
pkg-isocodes-bugs at alioth.debian.org
pkg-isocodes-bugs at alioth.debian.org
Sat Oct 1 18:10:52 UTC 2011
Bugs item #313369, was changed at 2011-09-28 12:31 by anatoly techtonik
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413077&aid=313369&group_id=30316
Status: Open
Priority: 3
Submitted By: anatoly techtonik (techtonik-guest)
Assigned to: Nobody (None)
Summary: Space delimiters in ISO-3166-2 codes
Part: None
Initial Comment:
Some codes are delimited with spaces (e.g. 'AZ NX') and this causes a problem with automated processing. It would be less work for everyone if these there normalized to dash delimited format ('AX-NX').
Consider example:
from pycountry import subdivisions
for x in subdivisions.get(country_code='AZ'):
print x.code, x.parent_code
# here ^^^ pycountry creates parent country code from 'NZ' attribute of subdivision
# by appending it to country name with dash
for x in subdivisions.get(country_code='AZ'):
print x.code, x.parent_code, x.parent.code
# pycountry tries to find entry for 'AZ-NZ' code to instantiate x.parent object and fails,
# because correct code here is 'AZ NZ'
----------------------------------------------------------------------
Comment By: anatoly techtonik (techtonik-guest)
Date: 2011-10-01 18:10
Message:
Awesome. Thanks!
----------------------------------------------------------------------
Comment By: Christian Perrier (bubulle)
Date: 2011-09-28 20:08
Message:
I just committed a change normalizing the separator to "-"
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413077&aid=313369&group_id=30316
More information about the Pkg-isocodes-devel
mailing list