[Python-Dev] Unifying Long Integers and Integers: baseint (original) (raw)
Guido van Rossum guido at python.org
Thu Aug 12 06:14:53 CEST 2004
- Previous message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Next message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
1. Make bytes a synonuym for str.
Hmm... I worry that a simple alias would just encourage confused usage, since the compiler won't check. I'd rather see bytes an alias for a bytes array as defined by the array module.
2. Warn about the use of bytes as a variable name.
Is this really needed? Builtins don't byte variable names.
3. Introduce b"..." literals as a synonym for current string literals, and have them not generate warnings if non-ascii characters were used in them without a coding cookie.
I expecet all sorts of problems with that, such as what it would mean if Unicode or multibyte characters are used in the source.
Do we really need byte array literals at all? I don't expect there to be much of a demand. Rather, byte arrays would eventually be returned by the read() method when a file is opened in binary mode. (Isn't this roughly how Java does this?) We could start doing this relatively soon if we used a new mode character ("B" anyone?).
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Next message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]