Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@KostyaEsmukov
Copy link
Member

Currently only GoogleV3 implements a query returning a timezone. It returns pytz.timezone directly, and the raw geocoder response is not accessible. This PR introduces a geopy.Location-like wrapper for pytz.timezone -- geopy.Timezone.

For a smooth transition I decided to introduce a new GoogleV3.reverse_timezone method, which is similar to GoogleV3.timezone except that it returns geopy.Timezone object. I don't really like the reverse_timezone method name, but I couldn't come up with a better idea of smooth transition from
pytz.timezone as return type to geopy.Timezone.

This feature came out from #327.

@KostyaEsmukov KostyaEsmukov added this to the 1.18 milestone Nov 4, 2018
geopy.Timezone is a wrapper for pytz timezone and a raw geocoder
response.

I don't really like the new `reverse_timezone` method name, but
I couldn't come up with a better idea of smooth transition from
pytz.timezone as return type to geopy.Timezone rather than to rename
the method.
@KostyaEsmukov KostyaEsmukov merged commit 8970260 into master Nov 4, 2018
@KostyaEsmukov KostyaEsmukov deleted the add-timezone-wrapper branch November 4, 2018 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants