Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Q: exception objects

8 views
Skip to first unread message

Leopold Toetsch

unread,
Jun 22, 2004, 8:56:47 AM6/22/04
to Perl 6 Internals
Pie-thon has Exception objects. We'll need such beasts too. So:
1) How do we "translate" Python classes? Properties only? Or
full ParrotClass objects?
2) We'll need to classify our exceptions somehow so that we can model an
exception class hierarchy. We'll also need to catch specific exceptions
properly so that:

# from b1.py - pseudo code
try:
n = self.P0(n+1) # recursive
except RuntimeError:
# pass
return n

can catch specific exceptions.

Comments welcome.
leo

Dan Sugalski

unread,
Jun 22, 2004, 10:37:34 AM6/22/04
to Leopold Toetsch, Perl 6 Internals
On Tue, 22 Jun 2004, Leopold Toetsch wrote:

> Pie-thon has Exception objects. We'll need such beasts too. So:
> 1) How do we "translate" Python classes? Properties only? Or
> full ParrotClass objects?

I think ParrotClass objects with properties should work fine.

Python objects are also referred to by reference, which we need to deal
with.

> 2) We'll need to classify our exceptions somehow so that we can model an
> exception class hierarchy.

Exceptions have always been spec'd out to have language/type/subtype
attached to them, though we've not implemented that. I think it's time to
do so.

Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

0 new messages