First release of Shed Skin, a Python-to-C++ compiler.

Fuzzyman fuzzyman at gmail.com
Mon Sep 12 10:41:40 EDT 2005


Mark Dufour wrote:
> >Obviously, neither the 0 nor the message following should have been
> >displayed. It's a pity that this assumption was made, but given the short
> >time the project's been going I can understand it, hopefully Mark will
> >continue towards greater python compliance :)
>
> The latter is certainly my goal. I just haven't looked into supporting
> exceptions yet, because I personally never use them. I feel they
> should only occur in very bad situations, or they become goto-like
> constructs that intuitively feel very ugly. In the 5500 lines of the
> compiler itself, I have not needed to use a single exception. For
> example, I prefer to check whether a file exists myself, rather than
> executing code that can suddenly jump somewhere else. There's probably
> some use for exceptions, but I don't (want to?) see it.
>
> Seeing how often exceptions are used by other people though, it's
> probably one of the first things I should look into.. :-)
>

In general it's considered quite pythonic to catch exceptions :-)

It's a particularly useful way of implementing duck typing for example.

I'm not sure if I've got *any* code that doesn't use exceptions
somewhere....

;-)

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml


> 
> thanks!
> mark.




More information about the Python-list mailing list