Message87551
| Author |
rbcollins |
| Recipients |
gregory.p.smith, kristjan.jonsson, pitrou, rbcollins |
| Date |
2009年05月10日.21:14:39 |
| SpamBayes Score |
8.500837e-10 |
| Marked as misclassified |
No |
| Message-id |
<1241990081.99.0.145943809642.issue5804@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Maybe I'm missing something, but isn't the offset parameter just another
way of spelling
buffer(input, offset)?
I like the avoiding of copying, just wondering if having a magic
parameter to get a tuple is really better than (say)
result, used = zlib.decompress2(source)
if used<len(source):
result2, used = zlib.decompress2(buffer(source, used))
This changes two things. Rather than a magic parameter it adds a new
function which always returns tuples (meaning that you don't need magic
to make sure users don't accidentally pass offset=None and get a single
result when they wanted a tuple), and uses the built in buffer facility
to avoid copying rather than relying on delayed slicing. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年05月10日 21:14:42 | rbcollins | set | recipients:
+ rbcollins, gregory.p.smith, pitrou, kristjan.jonsson |
| 2009年05月10日 21:14:41 | rbcollins | set | messageid: <1241990081.99.0.145943809642.issue5804@psf.upfronthosting.co.za> |
| 2009年05月10日 21:14:40 | rbcollins | link | issue5804 messages |
| 2009年05月10日 21:14:39 | rbcollins | create |
|