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

Re: svn commit: rev 5378 - trunk/subversion/tests/clients/cmdline

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-03-19 01:26:00 CET

B. W. Fitzpatrick wrote:

>After the above commit, I talked it over with Karl and determined
>that, in order to do this bit by bit in reviewable hunks that I would
>next convert the stuff inside svntest that currently returns 0 or
>non-zero to return 0 or raise. Then I could leisurely convert each
>file in the cmdline directory to the format that you described above,
>and once that was done, remove the spurious returns from those
>functions in svntest. Does that make sense?
>
About 50% :-)

You don't have to return 0; don't return anything, which means return
None, which is false in any conditional test, which in turn means any
if's that don't check explicitly for 0 (and there should not be any) are
just fine.

>Do we want a custom class for everything? Why can't we just raise with
>a description like:
>
> raise svntest.Failure, "Blah blah blah"
>
>And handle that appropriately. Or is it more Pythonesque to have a
>zillion Exception classes.
>
>

Derive an exeption class if you'll use it several times, or if the error
one that's often checked for. For one-off cases, just add a description.
See what the main.SVNTree* classes do.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 19 01:28:44 2003

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.