VirtualBox

Changeset 28751 in vbox for trunk/src/VBox/Main/webservice


Ignore:
Timestamp:
Apr 26, 2010 2:38:45 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60631
Message:

python: WS bits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/websrv-python.xsl

    r28675 r28751  
    416416      if isinstance(other,int):
    417417         return self.handle == other
     418      if isinstance(other,basestring):
     419         return str(self) == other
    418420      return False
    419421
     
    423425      if isinstance(other,int):
    424426         return self.handle != other
     427      if isinstance(other,basestring):
     428         return str(self) != other
    425429      return True
    426430
     
    530534  def __ne__(self,other):
    531535      if self.isarray:
    532          return not isinstance(other,String) or self.handle == other.handle
     536         return not isinstance(other,String) or self.handle != other.handle
    533537      if isinstance(other,String):
    534538         return self.handle != other.handle
     
    639643  def __float__(self):
    640644       return float(self.handle)
     645
     646  def __lt__(self, other):
     647       if self.isarray:
     648            return NotImplemented
     649       else:
     650            return self.handle < other
     651
     652  def __le__(self, other):
     653       if self.isarray:
     654            return NotImplemented
     655       else:
     656            return self.handle <= other
     657
     658  def __eq__(self, other):
     659       return self.handle == other
     660
     661  def __ne__(self, other):
     662       return self.handle != other
     663
     664  def __gt__(self, other):
     665       if self.isarray:
     666            return NotImplemented
     667       else:
     668            return self.handle > other
     669
     670  def __ge__(self, other):
     671       if self.isarray:
     672            return NotImplemented
     673       else:
     674            return self.handle >= other
    641675
    642676import struct
     
    784818  def __str__(self):
    785819       return str(self.handle)
     820
     821  def __eq__(self, other):
     822       return self.handle == other
     823
     824  def __ne__(self, other):
     825       return self.handle != other
    786826
    787827  def __getattr__(self,attr):
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette