We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1647688 commit 21c49c3Copy full SHA for 21c49c3
1 file changed
pyPostcode/__init__.py
@@ -14,6 +14,7 @@
14
15
import json
16
import logging
17
+from warnings import warn
18
19
20
__version__ = '0.5'
@@ -221,6 +222,12 @@ def postcode(self):
221
222
def city(self):
223
return self._data.get('city')
224
225
+ @property
226
+ def town(self):
227
+ warn('Use the attribute "city" instead',
228
+ DeprecationWarning, stacklevel=2)
229
+ return self.city
230
+
231
@property
232
def municipality(self):
233
return self._data.get('municipality')
0 commit comments