<s>
"	O
In	O
object-oriented	B-Language
systems	O
with	O
multiple	B-Application
inheritance	I-Application
,	O
</s>
<s>
C3	B-Application
superclass	I-Application
linearization	I-Application
is	O
an	O
algorithm	O
used	O
primarily	O
to	O
obtain	O
the	O
order	O
in	O
which	O
methods	B-Language
should	O
be	O
inherited	O
in	O
the	O
presence	O
of	O
multiple	B-Application
inheritance	I-Application
.	O
</s>
<s>
In	O
other	O
words	O
,	O
the	O
output	O
of	O
C3	B-Application
superclass	I-Application
linearization	I-Application
is	O
a	O
deterministic	O
Method	O
Resolution	O
Order	O
(	O
MRO	O
)	O
.	O
</s>
<s>
C3	B-Application
superclass	I-Application
linearization	I-Application
is	O
called	O
C3	O
because	O
it	O
"	O
is	O
consistent	O
with	O
three	O
properties	O
"	O
:	O
</s>
<s>
a	O
consistent	O
extended	O
precedence	B-General_Concept
graph	I-General_Concept
,	O
</s>
<s>
It	O
was	O
first	O
published	O
at	O
the	O
1996	O
OOPSLA	O
conference	O
,	O
in	O
a	O
paper	O
entitled	O
"	O
A	O
Monotonic	O
Superclass	O
Linearization	O
for	O
Dylan	B-Language
"	O
.	O
</s>
<s>
It	O
was	O
adapted	O
to	O
the	O
Open	B-Language
Dylan	I-Language
implementation	O
in	O
January	O
2012	O
following	O
an	O
enhancement	O
proposal	O
.	O
</s>
<s>
It	O
has	O
been	O
chosen	O
as	O
the	O
default	O
algorithm	O
for	O
method	O
resolution	O
in	O
Python	B-Language
2.3	O
(	O
and	O
newer	O
)	O
,	O
Raku	B-Application
,	O
Parrot	B-Language
,	O
Solidity	B-Protocol
,	O
and	O
PGF/TikZ	B-Operating_System
'	O
s	O
Object-Oriented	B-Language
Programming	I-Language
module	O
.	O
</s>
<s>
It	O
is	O
also	O
available	O
as	O
an	O
alternative	O
,	O
non-default	O
MRO	O
in	O
the	O
core	O
of	O
Perl	B-Language
5	I-Language
starting	O
with	O
version	O
5.10.0	O
.	O
</s>
<s>
An	O
extension	O
implementation	O
for	O
earlier	O
versions	O
of	O
Perl	B-Language
5	I-Language
named	O
Class::C3	O
exists	O
on	O
CPAN	B-Language
.	O
</s>
<s>
Python	B-Language
's	O
Guido	O
van	O
Rossum	O
summarizes	O
C3	B-Application
superclass	I-Application
linearization	I-Application
thus	O
:	O
</s>
<s>
The	O
C3	B-Application
superclass	I-Application
linearization	I-Application
of	O
a	O
class	O
is	O
the	O
sum	O
of	O
the	O
class	O
plus	O
a	O
unique	O
merge	O
of	O
the	O
linearizations	O
of	O
its	O
parents	O
and	O
a	O
list	O
of	O
the	O
parents	O
itself	O
.	O
</s>
<s>
A	O
naive	O
divide-and-conquer	B-Algorithm
approach	O
to	O
computing	O
the	O
linearization	O
of	O
a	O
class	O
may	O
invoke	O
the	O
algorithm	O
recursively	O
to	O
find	O
the	O
linearizations	O
of	O
parent	O
classes	O
for	O
the	O
merge-subroutine	O
.	O
</s>
<s>
To	O
detect	O
such	O
a	O
cycle	O
and	O
to	O
break	O
the	O
infinite	O
recursion	O
(	O
and	O
to	O
reuse	O
the	O
results	O
of	O
previous	O
computations	O
as	O
an	O
optimization	O
)	O
,	O
the	O
recursive	O
invocation	O
should	O
be	O
shielded	O
against	O
re-entrance	B-Operating_System
of	O
a	O
previous	O
argument	O
by	O
means	O
of	O
a	O
cache	O
or	O
memoization	O
.	O
</s>
<s>
This	O
algorithm	O
is	O
similar	O
to	O
finding	O
a	O
topological	B-Algorithm
ordering	I-Algorithm
.	O
</s>
<s>
Raku	B-Application
uses	O
C3	B-Application
linearization	I-Application
for	O
classes	O
by	O
default	O
:	O
</s>
