Author uzume
Recipients barry, belopolsky, benjamin.peterson, cben, eric.araujo, ezio.melotti, flox, georg.brandl, gvanrossum, jcea, lemburg, loewis, ncoghlan, petri.lehtinen, ssbarnea, uzume, vstinner
Date 2012-09-12.19:09:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347476997.39.0.459436175583.issue7475@psf.upfronthosting.co.za>
In-reply-to
Content
Many have chimed in on this topic but I thought I would lend my stance--for whatever it is worth.

I also believe most of these do not fit concept of a character codec and some sort of transforms would likely be useful, however most are sort of specialized (e.g., there should probably be a generalized compression library interface al la hashlib):

rot13: a (albeit simplistic) text cipher (str to str; though bytes to bytes could be argued since since many crypto functions do that)

zlib, bz2, etc. (lzma/xz should also be here): all bytes to bytes compression transforms

hex(adecimal) uu, base64, etc.: these more or less fit the description of a character codec as they map between bytes and str, however, I am not sure they are really the same thing as these are basically doing a radix transformation to character symbols and the mapping it not strictly from bytes to a single character and back as a true character codec seems to imply. As evidenced by by int() format() and bytes.fromhex(), float.hex(), float.fromhex(), etc., these are more generalized conversions for serializing strings of bits into a textual representation (possibly for human consumption).

I personally feel any <type/class>.hex(), etc. method would be better off as a format() style formatter if they are to exist in such a space at all (i.e., not some more generalized conversion library--which we have but since 3.x could probably use to be updated and cleaned up).
History
Date User Action Args
2012-09-12 19:09:57uzumesetrecipients: + uzume, lemburg, gvanrossum, loewis, barry, georg.brandl, jcea, cben, ncoghlan, belopolsky, vstinner, benjamin.peterson, ezio.melotti, eric.araujo, ssbarnea, flox, petri.lehtinen
2012-09-12 19:09:57uzumesetmessageid: <1347476997.39.0.459436175583.issue7475@psf.upfronthosting.co.za>
2012-09-12 19:09:57uzumelinkissue7475 messages
2012-09-12 19:09:55uzumecreate