@@ -21,12 +21,10 @@ class PlaceRecord(Record):
2121 """All records with :py:attr:`names` subclass :py:class:`PlaceRecord`"""
2222 __metaclass__ = ABCMeta
2323
24- # XXX - why did we name it 'name' instead of 'names'?
2524 def __init__ (self , languages = None , ** kwargs ):
2625 if languages is None :
2726 languages = []
2827 object .__setattr__ (self , 'languages' , languages )
29- kwargs ['names' ] = kwargs .pop ('name' , [])
3028 super (PlaceRecord , self ).__init__ (** kwargs )
3129
3230 @property
@@ -53,6 +51,7 @@ class City(PlaceRecord):
5351 passed to the constructor. This attribute is returned by all end points.
5452 :ivar names: This returns a dictionary where the keys are language codes
5553 and the values are names. This attribute is returned by all end points.
54+
5655 """
5756 _valid_attributes = set (['confidence' , 'geoname_id' , 'names' ])
5857
@@ -76,6 +75,7 @@ class Continent(PlaceRecord):
7675 passed to the constructor. This attribute is returned by all end points.
7776 :ivar names: This returns a dictionary where the keys are language codes
7877 and the values are names. This attribute is returned by all end points.
78+
7979 """
8080 _valid_attributes = set (['continent_code' , 'geoname_id' , 'names' ])
8181
@@ -132,7 +132,8 @@ class Location(Record):
132132 location is in the US. MaxMind returns the same metro codes as the
133133 Google AdWords API
134134 (https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions).
135- This attribute is returned by all end points except the Country end point.
135+ This attribute is returned by all end points except the Country end
136+ point.
136137 :ivar postal_code: This returns the postal code of the location. Postal
137138 codes are not available for all countries. In some countries, this will
138139 only contain part of the postal code. This attribute is returned by all
@@ -141,9 +142,9 @@ class Location(Record):
141142 MaxMind's confidence that the postal code is correct. This attribute is
142143 only available from the Omni end point.
143144 :ivar time_zone: This returns the time zone associated with location, as
144- specified by the IANA Time Zone Database (http://www.iana.org/time-zones),
145- e.g., "America/New_York". This attribute is returned by all end points
146- except the Country end point.
145+ specified by the IANA Time Zone Database
146+ (http://www.iana.org/time-zones), e.g., "America/New_York". This
147+ attribute is returned by all end points except the Country end point.
147148
148149 """
149150 _valid_attributes = set (['accuracy_radius' , 'latitude' , 'longitude'
@@ -166,7 +167,7 @@ class Region(PlaceRecord):
166167 :ivar geoname_id: This is a GeoName ID for the region. This attribute
167168 is returned by all end points.
168169 :ivar iso_3166_2: This is a string up to three characters long
169- contain the region portion of the ISO 3166-2 code
170+ contain the region portion of the ISO 3166-2 code
170171 (http://en.wikipedia.org/wiki/ISO_3166-2). This attribute is returned
171172 by all end points.
172173 :ivar name: The name of the region based on the languages list
@@ -208,12 +209,13 @@ class Traits(Record):
208209 address locally assigned to it. This attribute is returned by all end
209210 points.
210211 :ivar is_anonymous_proxy: This returns true if the IP is an anonymous
211- proxy. See http://dev.maxmind.com/faq/geoip#anonproxy for further details.
212- This attribute is returned by all end points.
212+ proxy. See http://dev.maxmind.com/faq/geoip#anonproxy for further
213+ details. This attribute is returned by all end points.
213214 :ivar is_transparent_proxy: This returns true if the IP is a transparent
214215 proxy. This attribute is returned by all end points.
215216 :ivar isp: This returns the name of the ISP associated the IP address.
216- This attribute is only available from the City/ISP/Org and Omni end points.
217+ This attribute is only available from the City/ISP/Org and Omni end
218+ points.
217219 :ivar organization: This returns the name of the organization associated
218220 the IP address. This attribute is only available from the City/ISP/Org
219221 and Omni end points.
0 commit comments