__str__ vs. __repr__

Tres Seaver tseaver at starbase.neosoft.com
Mon Nov 15 15:48:39 EST 1999


In article <m3n1shp2uu.fsf at atrus.jesus.cam.ac.uk>,
Michael Hudson  <mwh21 at cam.ac.uk> wrote:
>philh at vision25.demon.co.uk (Phil Hunt) writes:
>
>> In article <01fd01bf2dce$d2c03cf0$f29b12c2 at secret.pythonware.com>
>>            fredrik at pythonware.com "Fredrik Lundh" writes:
>> > 2) what's the reason byte code cannot be used to recover
>> > the original source code
>> 
>> Perhaps because two different (but obviously functionally
>> identical and very similar) source codes could produce the same
>> byte code.
>
>I doubt it actually. Python's bytecode is really pretty high
>level. Leastaways, I can't think of any examples.
>
>It's one of those things I might get round to writing one of these
>days. I don't really know how hard it would be. Not especially, I
>suspect.

Besides, you need to defer it until _after_ this year's Pythonic award,
for which you are already in pole position for inventing bytecodehacks :).

Tres.
-- 
---------------------------------------------------------------
Tres Seaver           tseaver at palladion.com       713-523-6582
Palladion Software    http://www.palladion.com




More information about the Python-list mailing list