Message149021
| Author |
vstinner |
| Recipients |
doko, eric.araujo, eysispeisi, georg.brandl, itkach, koen, lars.gustaebel, loewis, nadeem.vawda, nikratio, pitrou, proyvind, v+python, vstinner |
| Date |
2011年12月08日.12:00:53 |
| SpamBayes Score |
0.006262291 |
| Marked as misclassified |
No |
| Message-id |
<1323345653.98.0.791835362176.issue5689@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Some comments about 2011年12月08日-tarfile-lzma.diff:
> elif self.buf.startswith(b"\x5d\x00\x00\x80") or self.buf.startswith(b"...
Micro-optimization: you can use self.buf.startswith((b"\x5d\x00\x00\x80", b"\xfd7zXZ")) here.
> raise ValueError("mode must be 'r' or 'w'.")
Error messages usually don't end with a dot (or am I wrong?).
It would be better to use a skip instead of just return here:
def test_no_name_argument(self):
if self.mode.endswith("bz2") or self.mode.endswith("xz"):
# BZ2File and LZMAFile have no name attribute.
return
In _Stream.__init__, for zlib:
> self.exception = zlib.error
Could you add a test for this change? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年12月08日 12:00:54 | vstinner | set | recipients:
+ vstinner, loewis, georg.brandl, doko, lars.gustaebel, pitrou, koen, nadeem.vawda, eric.araujo, v+python, proyvind, nikratio, itkach, eysispeisi |
| 2011年12月08日 12:00:53 | vstinner | set | messageid: <1323345653.98.0.791835362176.issue5689@psf.upfronthosting.co.za> |
| 2011年12月08日 12:00:53 | vstinner | link | issue5689 messages |
| 2011年12月08日 12:00:53 | vstinner | create |
|