Carl Karsten wrote:
On Wed, Jul 20, 2011 at 11:33 AM, Ethan Furman <et...@stoneleaf.us> wrote:
as well as ignoring trailing white space for comparisons)
_backwards computability_ is the only reason to implement this in the
driver, and given there is currenly no code relying on it, nothing
will break if you don't. So don't :)
Okay, have you written a book? 'Cause I'm ready to buy it. ;)
The reason I have that (and I can make it be the option, not the
default), is that without it I have to write.... oh -- I could use
.startswith(), couldn't I? Well, I was going to say that code such as:
# look for so-and-so...
for rec in table:
if rec.full_name == 'John Doe':
do_something_with(rec)
and of course this will fail because FULL_NAME is a 40 character field,
and I should have said
if rec.full_name == 'John Doe '
and I really don't want to do that! Also, .startswith() is not the same
as ignoring trailing whitespace.
Given this little example, would you still not worry about trailing
whitespace?
~Ethan~
_______________________________________________
DB-SIG maillist - DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig