From ff090f27441141df0dce7ecf65cd2d68db4997bb Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Fri, 28 Jun 2024 09:35:43 -0400 Subject: [PATCH] Cannot use parameterized arguments in 3 --- thesethreewords.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/thesethreewords.py b/thesethreewords.py index cc0e84e..a398d6c 100644 --- a/thesethreewords.py +++ b/thesethreewords.py @@ -77,17 +77,18 @@ class WordHasher(object): self.six_wordlist = HUMAN_WORDLIST self.three_wordlist = GOOGLE_WORDLIST - def three_words(self, (lat, lon)): + def three_words(self, lat_long): """Convert coordinate to a combination of three words The coordinate is defined by latitude and longitude in degrees. """ + lat, lon = lat_long gh = geohash.encode(lat, lon, 9) words = "-".join(self.three_wordlist[p] for p in self.to_rugbits(self.geo_to_int(gh))) return words - def six_words(self, (lat, lon)): + def six_words(self, lat_long): """Convert coordinate to a combination of six words The coordinate is defined by latitude and longitude @@ -96,6 +97,7 @@ class WordHasher(object): With six words the word list contains only words which are short, easy to pronounce and easy distinguish. """ + lat, lon = lat_long gh = geohash.encode(lat, lon, 9) words = "-".join(self.six_wordlist[p] for p in self.to_bytes(self.pad(gh))) return words