Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#287 some dirty code in __init__.py

MySQLdb-1.2
closed
MySQLdb (285)
5
2012-09-19
2009-07-28
sevenj
No

--- init.py 2007-02-27 03:00:32.000000000 +0800
+++ init.py.new 2009-07-28 16:25:17.000000000 +0800
@@ -40,14 +40,14 @@
def ne(self, other):
from sets import BaseSet
if isinstance(other, BaseSet):
- return super(DBAPISet.self).ne(self, other)
+ return super(DBAPISet, self).ne(other)
else:
return other not in self

 def __eq__(self, other):
     from sets import BaseSet
     if isinstance(other, BaseSet):
  • return super(DBAPISet, self).eq(self, other)
  • return super(DBAPISet, self).eq(other)
    else:
    return other in self

Discussion

  • MizardX
    MizardX
    2009-11-08

    Also consider changing ImutableSet to frozenset to get rid of the deprecation warning.

     
  • All of this has already been fixed in the 1.2 branch and will be in a forthcoming release.