Re: [Python-3000] Signature of RawIOBase.read() ?

2008-07-28 Thread Guido van Rossum
On Mon, Jul 28, 2008 at 11:45 AM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > There is an uncertainty in the signature for RawIOBase.read(). > PEP 3116 says: >read(n: int) -> bytes > > but current io.py says: >def read(self, n: int = -1) -> bytes: > > Is omitting the `n` parameter always su

[Python-3000] Signature of RawIOBase.read() ?

2008-07-28 Thread Antoine Pitrou
Hi, There is an uncertainty in the signature for RawIOBase.read(). PEP 3116 says: read(n: int) -> bytes but current io.py says: def read(self, n: int = -1) -> bytes: Is omitting the `n` parameter always supported by RawIOBase implementations? (meaning: read up to the end) Regards Anto

[Python-3000] Review needed: regular expressions and unicode

2008-07-28 Thread Antoine Pitrou
Hi, I've posted my final patch to adapt the re module to the py3k standards of bytes/unicode separation. Here is a short summary of the changes: - mixing bytes and str patterns, search and replacement strings raises a TypeError - re.UNICODE and (?u) become almost no-ops: they are the default for