Skip to content

Commit 490cc6b

Browse files
committed
Fixing BoundingBox.corner() - was returning incorrect data.
1 parent 94dd8cd commit 490cc6b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tweepy/models.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,19 +338,23 @@ def parse(cls, api, json):
338338

339339
def origin(self):
340340
"""
341-
Return longitude, latitude of northwest corner of bounding box, as
342-
tuple. This assumes that bounding box is always a rectangle, which
341+
Return longitude, latitude of southwest (bottom, left) corner of
342+
bounding box, as a tuple.
343+
344+
This assumes that bounding box is always a rectangle, which
343345
appears to be the case at present.
344346
"""
345347
return tuple(self.coordinates[0][0])
346348

347349
def corner(self):
348350
"""
349-
Return longitude, latitude of southeast corner of bounding box, as
350-
tuple. This assumes that bounding box is always a rectangle, which
351+
Return longitude, latitude of northeast (top, right) corner of
352+
bounding box, as a tuple.
353+
354+
This assumes that bounding box is always a rectangle, which
351355
appears to be the case at present.
352356
"""
353-
return tuple(self.coordinates[0][1])
357+
return tuple(self.coordinates[0][2])
354358

355359

356360
class Place(Model):

0 commit comments

Comments
 (0)