[vox-tech] python: slicing extensions from file names

David Hummel vox-tech@lists.lugod.org
Wed, 30 Jul 2003 14:41:18 -0700


On Wed, Jul 30, 2003 at 02:22:22PM -0700, Micah J. Cowan wrote:
> 
> On Wed, Jul 30, 2003 at 01:47:37PM -0700, David Hummel wrote:
> >
> > On Wed, Jul 30, 2003 at 09:31:13AM -0700, Micah J. Cowan wrote:
> > >
> > > The only things I *really* wish I could get with Perl is: I wish
> > > it had exceptions,
> > 
> > Perl does have exception handling via eval.  You can eval your block
> > or expression, and then check $@ for the exception.
> 
> I'm aware of this. It's a hack and it sucks. But it is better than
> nothing.

I agree.  The eval EXPR form should definitely be avoided,
but eval BLOCK is usually OK.

-David