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

Re: Merging Ctypes Python Branch

From: Sage La Torra <sagelt_at_gmail.com>
Date: 2007-09-04 21:30:25 CEST

On 8/31/07, Eric Gillespie <epg@pretzelnet.org> wrote:
>
> - WC._build_path_list
>
> This sort of magic is generally a bad idea. It isn't at all
> easier for callers to pass in "file" than ["file"], but
> allowing both can lead to hidden bugs. I looked to see if
> other functions taking path lists behave this way, but it seems
> to be limited to wc.py.

I have to say I disagree. I can see your point (two extra key strokes
isn't much), but I like being able to write what I as a programmer
think, with as little interference as possible. When I want to perform
an action in a single thing, I think in terms of operating on a single
thing, not in terms of operating on a length 1 list of things. It's
really a small difference, but since the list must be processed anyway
(to put it into a ctypes-compatible array and canonicalize paths)
making a single item into a list isn't really a problem.

I guess my defense of this feature is mostly because I'm used to
perl-ish magic, where things happen to make the coder's life easier
(most of the time). I think the single item to list conversion that we
perform is fairly well tested and easy to maintain, but I won't be too
sad to see it go if it really is for the best.

Sage

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 4 21:27:20 2007

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