Fix opencage country parameter#342
Conversation
geopy/geocoders/opencage.py
Outdated
| @@ -116,8 +116,8 @@ def geocode( | |||
| :param str country: Provides the geocoder with a hint to the | |||
There was a problem hiding this comment.
According to the docs at https://opencagedata.com/api#forward-opt, the countrycode param restricts the results to the specified country, however the current description there says that it just provides a hint. Could you please update this description?
There was a problem hiding this comment.
Good point! I changed that.
| geocoder but will not restrict the possible results to the | ||
| supplied country. The country code is a 3 character code as | ||
| defined by the ISO 3166-1 Alpha 3 standard. | ||
| :param str country: Restricts the results to the specified country or countries. |
There was a problem hiding this comment.
It is not clear how one could specify multiple countries. Should it be a comma- or a space-separated list, or should it be a python list of strings?
I suppose this is not a single occurrence of such an ambiguity in geopy, so I'll address that for all geocoders later. To keep things "pythonic", it should accept a list of strings instead of a single comma-separated string (as specified in their docs at https://opencagedata.com/api#forward-opt).
|
Thanks for merging! |
|
TBH I didn't think of that yet. I'll try to get to it next week. In the meantime you may want to consider installing from the master branch directly: |
|
I've just released Apologies for the delay! |
|
Great! Thanks for the info. |
fixes #341