What is the default MRO?

1 view
Skip to first unread message

Roger Browne

unread,
Jun 25, 2005, 5:59:56 PM6/25/05
to perl6-i...@perl.org
Hi,

What is parrot's default method resolution order? Is it like the old
Python MRO (left-to-right, depth-first)? Is it like the new Python MRO
[1] (left-to-right, depth-first, but discard all but the last occurrence
of duplicates)?

[1] "Unifying types and classes in Python 2.2" by Guido van Rossum
http://www.python.org/2.2/descrintro.html

Regards,
Roger Browne

Leopold Toetsch

unread,
Jun 26, 2005, 4:22:50 AM6/26/05
to Roger Browne, perl6-i...@perl.org
Roger Browne wrote:
> Hi,
>
> What is parrot's default method resolution order? Is it like the old
> Python MRO (left-to-right, depth-first)? Is it like the new Python MRO
> [1] (left-to-right, depth-first, but discard all but the last occurrence
> of duplicates)?

The latter. See also the test "constructor - diamond parents" in
t/pmc/object-meths.t

> Regards,
> Roger Browne

leo

Reply all
Reply to author
Forward
0 new messages