Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
Peter Otten wrote: The Set class has implementations for __cmp__() and __hash__() that unconditionally raise an exception. pychecker assumes that these methods are "abstract", i. e. meant to be overriden by a subclass, and warns that you are instantiating an abstract base class, while the intention

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread [EMAIL PROTECTED]
I don't know pychecker, maybe there's something wrong with it as your code seems valid to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Peter Otten
Istvan Albert wrote: > if I have this code: > > import sets > > class Foo: > x = sets.Set() > > then pychecker says: > > test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden > in a subclass > > I don't get this message. What is it trying to say, and why? The minimal

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
[EMAIL PROTECTED] wrote: <__main__.Foo instance at 0x00C578A0> Set([]) on 2.4. on WinXP. What environment do you run in? I'm running it on cygwin, but still don't get it, why the warning? Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread [EMAIL PROTECTED]
mport sets class Foo: def __init__(self): self.x = sets.Set() x = Foo() print x, getattr(x, 'x') gives for me: <__main__.Foo instance at 0x00C578A0> Set([]) on 2.4. on WinXP. What environment do you run in? -- http://mail.python.org/mailman/listinfo/python-list

pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
Hello all, if I have this code: import sets class Foo: x = sets.Set() then pychecker says: test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden in a subclass I don't get this message. What is it trying to say, and why? Istvan. -- http://mail.python.org/mailman/listinfo/pyth