Skip to content
Permalink
Browse files

Check class name directly

  • Loading branch information...
geographika committed Jun 27, 2018
1 parent 609db8c commit e2e143231f0c8fdfe7f4d0c6dfbdbeca94605d71
Showing with 2 additions and 2 deletions.
  1. +2 −2 mapscript/python/pyextend.i
@@ -80,8 +80,8 @@ def fromstring(data, mappath=None):
return self.toString()

def __contains__(self, item):
item_type = str(type(item))
if item_type == "<class 'mapscript.pointObj'>":
item_type = item.__class__.__name__
if item_type == "pointObj":
if item.x >= self.minx and item.x <= self.maxx \
and item.y >= self.miny and item.y <= self.maxy:
return True

0 comments on commit e2e1432

Please sign in to comment.
You can’t perform that action at this time.