Sublime Forum

Region hashes

#1

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]>>> a = sublime.Region(1)

b = sublime.Region(1)
a == b
True

a.hash()
4598902288

b.hash()
4598902200[/code]

0 Likes