2008/10/7 Pekka Laukkanen <[EMAIL PROTECTED]>:
> 2008/10/5 Fuzzyman <[EMAIL PROTECTED]>:
>> I may well be being dumb (it has happened before), but I'm struggling
>> to fix some code breakage with Python 2.6.
>>
>> I have some code that looks for the '__lt__' method on a class:
>>
>> if hasattr(clr,
2008/10/5 Fuzzyman <[EMAIL PROTECTED]>:
> I may well be being dumb (it has happened before), but I'm struggling
> to fix some code breakage with Python 2.6.
>
> I have some code that looks for the '__lt__' method on a class:
>
> if hasattr(clr, '__lt__'):
>
> However - in Python 2.6 object has grow
On Oct 6, 7:23 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
wrote:
> On Oct 6, 1:17 pm, Fuzzyman <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 6, 7:01 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
> > wrote:
> > > It's a very object oriented solution. Essentially you're inheriting
> >
On Oct 6, 1:17 pm, Fuzzyman <[EMAIL PROTECTED]> wrote:
> On Oct 6, 7:01 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
> wrote:
> > It's a very object oriented solution. Essentially you're inheriting
> > all the classes that you want to fail, from a class that does.
>
> But not a very good s
On Oct 6, 7:01 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
wrote:
> On Oct 6, 4:30 am, Fuzzyman <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 6, 1:13 am, MRAB <[EMAIL PROTECTED]> wrote:
>
> > > Fuzzyman wrote:
> > > > Hello all,
>
> > > > I may well be being dumb (it has happened before), bu
On Oct 6, 4:30 am, Fuzzyman <[EMAIL PROTECTED]> wrote:
> On Oct 6, 1:13 am, MRAB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Fuzzyman wrote:
> > > Hello all,
>
> > > I may well be being dumb (it has happened before), but I'm struggling
> > > to fix some code breakage with Python 2.6.
>
> > > I have some c
On Oct 6, 1:13 am, MRAB <[EMAIL PROTECTED]> wrote:
> Fuzzyman wrote:
> > Hello all,
>
> > I may well be being dumb (it has happened before), but I'm struggling
> > to fix some code breakage with Python 2.6.
>
> > I have some code that looks for the '__lt__' method on a class:
>
> > if hasattr(clr,
On Oct 5, 7:13 pm, MRAB <[EMAIL PROTECTED]> wrote:
> Fuzzyman wrote:
> > Hello all,
>
> > I may well be being dumb (it has happened before), but I'm struggling
> > to fix some code breakage with Python 2.6.
>
> > I have some code that looks for the '__lt__' method on a class:
>
> > if hasattr(clr,
Fuzzyman wrote:
> Hello all,
>
> I may well be being dumb (it has happened before), but I'm struggling
> to fix some code breakage with Python 2.6.
>
> I have some code that looks for the '__lt__' method on a class:
>
> if hasattr(clr, '__lt__'):
>
> However - in Python 2.6 object has grown a defau
Hello all,
Sorry - my messages aren't showing up via google groups, so I'm kind
of posting on faith...
Anyway, I solved my problem (I think)...
import sys
if sys.version_info[0] == 3:
def _has_method(cls, name):
for B in cls.__mro__:
if B is object:
conti
Hello all,
I may well be being dumb (it has happened before), but I'm struggling
to fix some code breakage with Python 2.6.
I have some code that looks for the '__lt__' method on a class:
if hasattr(clr, '__lt__'):
However - in Python 2.6 object has grown a default implementation of
'__lt__', s
11 matches
Mail list logo