PEP 259: Revise to remove context-driven magic from print
Alex Martelli
aleaxit at yahoo.com
Thu Jun 14 12:37:32 EDT 2001
"David LeBlanc" <whisper at oz.nospamnet> wrote in message
news:9gamor$8ft$6 at 216.39.170.247...
...
> makes sense to me. I also liked someone's idea of __print__ - if that
The 'someone' was me ("was I"...?).
> idea was in respect of giving objects the power to (as it where) print
> themselves (return their string representation - so call it asstring()).
How would that differ from the existing __str__ and __repr__ methods?
No, __print__ would rather underlie the print statement just like
__import__ underlies the import (and from) statements. But I guess
I gotta write a PEP about it...
Alex
More information about the Python-list
mailing list