Fiddling with the name of the antonym doesn't help.
The direction of "untransform" or whatever it's
called is only as clear as the direction of
"transform".
How about making the transformation parameter more descriptive?
gzipped = plaintext.transform(plaintext_to_gzip)
plaintext = gzipped.transform(gzip_to_plaintext)
I would rather have one function that can do lots of different
transformations, the same name can be used for bytes and strings, the
transformation can be subclassed, and it doesn't have to be reflexive if
that doesn't make sense.
somebytes.transform(ebcdic_to_plaintext)
OK, maybe that's no so common in YOUR world :-)
pict = open('me.jpg', 'r').read()
y = pict.transform(jpeg_to_png).transform(plaintext_to_base64)
Joel
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com