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 responsib
ct__ in the bytes_reduce
method (for pickling subclass instances). I was going to upload this
to the SF patch manager, but it appears to be closed to permit only
project members access.
Mathieu Fenniak
bytes-subclass-patch.diff
Description: Binary data
___
On 16-Sep-07, at 7:56 PM, Guido van Rossum wrote:
> So suppose my answer was "no, bytes won't be subclassable". How much
> would you really lose by having to wrap a separate object around a
> bytes object, rather than being able to subclass? How much extra code
> do you think you would have to writ
e
type. pyPdf derives from list and dict for different PDF object
types in a similar manner as well.
Mathieu Fenniak
___
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
Hi everyone,
I'd like to be able to derive from the bytes type, but this currently
isn't possible due to it missing the Py_TPFLAGS_BASETYPE. A comment
next to the flags indicates that this class is "sealed / final". I
tried to search this list for some information on this, but I
couldn't