Interesting problem comparing strings with integer values...

Carl Banks imbosol at vt.edu
Wed Jan 15 23:55:34 EST 2003


Chris Spencer wrote:
>        Programming is about solving problems.  I asked a programming
> question with a certain number of constraints as to what the
> solution could be.  I do NOT think it's off topic for this newsgroup
> just because you don't like the constraints.  If you can't help me,
> that's okay.  But please don't flame me.

Most people here didn't understand your question, because, frankly,
you asked it poorly.  You did state your design constraint: "I must be
able to store both integers and floating point numbers as strings,"
but you forgot to mention that the number has to be stored as a string
in SQL.  Naturally (and rightly), people here thought this meant you
had to store the number as a string in Python.  Naturally (and
rightly), people told you how do this kind of comparison in Python.
And naturally (and rightly), I thought that was a really stupid
constraint, and said so.

And naturally (and rightly), when you come back and say, "Oh, by the
way, I forgot to mention the comparison isn't going to be done in
Python," after people have already taken the time to answer you, they
are going to get a little edgy.

I think I've figured out exactly what you were trying to ask, and
answered it in another post.  But next time, try to state your
question better.  And please don't leave out crucial details like,
"the comparison is not actually done in Python."  :)


-- 
CARL BANKS




More information about the Python-list mailing list