Leopold Toetsch wrote:
What is the rational for this pythonism in Parrot core?
+The line of code in test case t/pie/b3 that motivates this is: + + print "using", cmp.__name__ + +Where cmp may be a NCI subroutine.
Python's builtin "cmp" is basially a Sub PMC. Parrot Sub's have already a name:
.sub main .const .Sub c = "cmp" print c .end .sub "cmp" .end
So I think, you could translate access to the "__name__" attribute directly to VTABLE_name(). WRT NCI: The b3.py test doesn't need it, but I can imagine that the method name of Parrots "cmp" method is just "__cmp" and available with VTABE_name().
leo