[DB-SIG] dBase III and VFP tables

Ethan Furman ethan at stoneleaf.us
Wed Jul 20 19:36:13 CEST 2011

Carl Karsten wrote:
> On Wed, Jul 20, 2011 at 11:33 AM, Ethan Furman <ethan at 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':

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 


More information about the DB-SIG mailing list