Home Download Buy Blog Forum Support

Region hashes

Region hashes

Postby adzenith on Sun Dec 04, 2011 8:28 pm

If two regions are identical, could they hash the same? This would greatly simplify my life, as right now I have to convert Regions to tuples before adding them to a set, and then convert them back to Regions before using them.

Code: Select all
>>> a = sublime.Region(1)
>>> b = sublime.Region(1)
>>> a == b
>>> a.__hash__()
>>> b.__hash__()
Posts: 1403
Joined: Mon Oct 19, 2009 9:12 pm

Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests