On Mon, 13 Jan 2014 13:32:28 -0800 Guido van Rossum <gu...@python.org> wrote: > > But formatb() feels absurd to me. PEP 460 has neither a precise > specification or any actual examples, so I can't tell whether the > intention is that the format string can *only* contain {...} sequences > or whether it can also contain "regular" characters. Translating to > formatb(), my question comes down to the legality of the following > example: > > b'Hello, {}'.formatb(name) # Where name is some bytes object
Yes, it's allowed. But so is: b'\xff\x00{}\x85{}'.formatb(payload, trailer) The ASCII bias is because of the bytes literal notation. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com