On 17-Sep-07, at 11:53 AM, Guido van Rossum wrote: >> "writeToStream" method that serializes the object -- a byte string >> would write out <68656c6c6f>, a text string (hello), and so on for >> other more complex types (dictionaries, labels, arrays, PDF data >> streams). The type is also responsible for encrypting itself when >> applicable. > > This sounds like a perfect application for generic functions instead > of subclassing.
Sure, there are other options for writing and organizing this code. But, this is a valid application of subclassing the bytes type, and it is the method I would prefer to be able to implement. Mathieu _______________________________________________ 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