[Python-ideas] Adding 'bytes' as alias for 'latin_1' codec.
Nick Coghlan
ncoghlan at gmail.com
Tue May 31 10:24:30 CEST 2011
On Tue, May 31, 2011 at 5:32 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Stephen J. Turnbull wrote:
>
>> But even as a separate type, 'ascii' still can't mix with bytes
>> safely,
>
> Yes, it can, because it's also bytes. :-)
>
> If you're using the special ascii type at all, rather
> than an ordinary str, it's precisely because you want
> to mix it with bytes. Making that part hard would
> defeat the purpose,
Indeed, the specific use case here is working with ASCII snippets
embedded within ASCII compatible encodings (or otherwise demarcated
from the 8-bit data).
As I stated elsewhere, we still need more usage of Python 3 in
production before we can find out whether or not this is a significant
enough use case to require builtin support, or if third party
libraries will be up to the task.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list