FixedPoint

Gerhard Häring gh_pythonlist at gmx.de
Thu Feb 7 17:51:09 EST 2002


Le 07/02/02 à 14:06, Mark McEahern écrivit:
> Steve Holden wrote:
> > Oh, no, don't go changing other modules to fix this. Hadn't read your post
> > carefully enough to realize your problems were occurring with database
> > access.
> 
> As it turns out, Gerhard Häring replied to the thread and he seems to want
> to fix the x == None stuff.  Also, his post made me realize that PyPgSql
> will look for and call a _quote() method on params so that I don't have to
> resort to my goofy fix of making __repr__ return str(self).
> 
> It's all good.

Well, not all. Somebody needs to fix that fixed point class. Failing to
compare to None is clearly a bug.

I don't think pyPgSQL really needs fixing for SQL-ing None, but I'm
willing to do it, if only because "is None" is faster <0.7 wink>.

I think I also found a way to test for iterability:
operator.isSequenceType() seems to do it, but I risk catching too much
(Strings are also sequences, for example). So I could try testing for
strings first.

I fear this might introduce more bugs. Sigh.

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 2.1 °C      Wind: 2.7 m/s




More information about the Python-list mailing list