[Python-checkins] r68530 - in python/branches/release30-maint: Demo/classes/Complex.py Demo/classes/bitvec.py Lib/collections.py

mark.dickinson python-checkins at python.org
Sun Jan 11 12:55:32 CET 2009


Author: mark.dickinson
Date: Sun Jan 11 12:55:32 2009
New Revision: 68530

Log:
Merged revisions 68529 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r68529 | mark.dickinson | 2009-01-11 11:54:02 +0000 (Sun, 11 Jan 2009) | 2 lines
  
  Remove __long__ methods from UserString and from Demo/ classes.
........


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Demo/classes/Complex.py
   python/branches/release30-maint/Demo/classes/bitvec.py
   python/branches/release30-maint/Lib/collections.py

Modified: python/branches/release30-maint/Demo/classes/Complex.py
==============================================================================
--- python/branches/release30-maint/Demo/classes/Complex.py	(original)
+++ python/branches/release30-maint/Demo/classes/Complex.py	Sun Jan 11 12:55:32 2009
@@ -39,7 +39,6 @@
 #
 # These conversions accept complex arguments only if their imaginary part is zero:
 # int(z)
-# long(z)
 # float(z)
 #
 # The following operators accept two complex numbers, or one complex number
@@ -147,11 +146,6 @@
             raise ValueError("can't convert Complex with nonzero im to int")
         return int(self.re)
 
-    def __long__(self):
-        if self.im:
-            raise ValueError("can't convert Complex with nonzero im to long")
-        return int(self.re)
-
     def __float__(self):
         if self.im:
             raise ValueError("can't convert Complex with nonzero im to float")

Modified: python/branches/release30-maint/Demo/classes/bitvec.py
==============================================================================
--- python/branches/release30-maint/Demo/classes/bitvec.py	(original)
+++ python/branches/release30-maint/Demo/classes/bitvec.py	Sun Jan 11 12:55:32 2009
@@ -315,9 +315,6 @@
     def __int__(self):
         return int(self._data)
 
-    def __long__(self):
-        return int(self._data)
-
     def __float__(self):
         return float(self._data)
 

Modified: python/branches/release30-maint/Lib/collections.py
==============================================================================
--- python/branches/release30-maint/Lib/collections.py	(original)
+++ python/branches/release30-maint/Lib/collections.py	Sun Jan 11 12:55:32 2009
@@ -255,7 +255,6 @@
     def __str__(self): return str(self.data)
     def __repr__(self): return repr(self.data)
     def __int__(self): return int(self.data)
-    def __long__(self): return int(self.data)
     def __float__(self): return float(self.data)
     def __complex__(self): return complex(self.data)
     def __hash__(self): return hash(self.data)


More information about the Python-checkins mailing list