[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r19341 - trunk/tools/dev

From: David James <djames_at_collab.net>
Date: 2006-04-13 18:59:41 CEST

On 4/13/06, maxb@tigris.org <maxb@tigris.org> wrote:
> name_components = name.split()
> if len(name_components) == 1:
> - if name_components[0] != name:
> - complain("Python couldn't have done that, could it?", True)
> + name = name_components[0] # Effectively, name = name.strip()

Effectively, you've just written:
   name_components = name.split()
   if len(name_components) == 1:
      name = name.strip()
      ...

Why only strip "name" if len(name_components) == 1? This isn't
correct. Here's an example test case:
   name = "Max Bowsher <max@bowsher.com> "

Your name has more than one component, but it still needs to be
stripped, so that we can correctly detect that name_components[-1][-1]
== '>'. I think we'd be better off to apply Madan's patch, which
correctly adds the "name.strip()" call before the split.

Cheers,

David

-
David James -- http://www.cs.toronto.edu/~james

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 13 19:01:13 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.