[Python-3000] bytes and dicts (was: PEP 3137: Immutable Bytes and Mutable Buffer) (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Sep 29 01:48:33 CEST 2007


Jim Jewett wrote:

If code clears an existing dict rather than creating a new one, then that specific dict is probably a communication channel, and the API should specify whether it takes bytes or characters.

This suggests it might be simpler to have normal dicts refuse to accept bytes at all, and have another type bytedict for that purpose.

-- Greg



More information about the Python-3000 mailing list