In Python there are two string representations for objects: the
canonical representation repr() and the normal (human readable) string
representation str(). Would we want this dichotomy in perl 6 as well?
The main difference between the two is that strings returned from repr()
are directly evalable. e.g., the following would be equivalent:

        $a = "foo\r\n";
        print $a;               
        print _$a;
        print eval(repr($a));

That's probably a poor example of its utility, but I'm not as well
versed in python to give repr() its due in a perl example.

So ... comments?  Anyone out there know python well enough to say why
they have both repr() and str()?

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to