bndn / gedit-sessionsaver

The gedit session saver plugin for GNOME 3.0-3.8
GNU General Public License v2.0
14 stars 6 forks source link

fixed rich comparison methods for session #7

Closed NPN closed 10 years ago

NPN commented 10 years ago

edit: Oops. I guess git filter-branch is pretty dangerous. See #9 for a fixed version.

Porting Session Saver to Python 3 removed the __cmp__ method for comparing objects and replaced them with the rich comparison methods like __lt__. However, during the port, __eq__ wasn't added to the Session class, which meant that identically named sessions weren't considered equal. This meant that sessions would never be changed, leading them to be duplicated: session_duplicate This adds the __eq__ method in, and the __ne__ method just for completeness.