On Sun, 2004-12-19 at 23:43, Jp Calderone wrote:
> On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote:
> > [snip]
> >
> > Of course, to take advantage of this requires that writev be exposed. I
> > have an implementation of writev. This implementation is reasonably
> > s
Adam DePrince <[EMAIL PROTECTED]> writes:
> I want to include it because POSIX has a single OS call that
> conceptually maps pretty closely to writelines.
I just want to point out that on some systems, POSIX is a
compatability layer, not an OS layer. On those systems, the
implementer of writev is
Adam DePrince wrote:
[snip great explanation]
I want to include it because POSIX has a single OS call that
conceptually maps pretty closely to writelines. writev can be faster
because you don't have to do memory copies to buffer data in one place
for it -- the OS will do that, and can sometimes de
On Mon, 2004-12-20 at 02:18, Steven Bethard wrote:
> Adam DePrince wrote:
> > file.writelines( seq ) and map( file.write, seq ) are the same; the
> > former is syntactic sugar for the later.
>
> Well, that's not exactly true. For one thing, map(file.write, seq)
> returns a list of Nones, while f
Adam DePrince wrote:
file.writelines( seq ) and map( file.write, seq ) are the same; the
former is syntactic sugar for the later.
Well, that's not exactly true. For one thing, map(file.write, seq)
returns a list of Nones, while file.writelines returns only the single
None that Python functions w
On Mon, 2004-12-20 at 00:30, Steven Bethard wrote:
> Adam DePrince wrote:
> > Many other programmers have faced a similar issue; cStringIO,
> > ''.join([mydata]), map( file.write, [mydata]) are but some attempts at
> > making this process more efficient by jamming the components to be
> > written i
On Sun, 2004-12-19 at 23:43, Jp Calderone wrote:
> On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote:
> > [snip]
[snip]
to free the memory, of course.
>
> The support of iterators is a cool idea, but I'm not sure
> it is actually useful. Consider the case where not
Adam DePrince wrote:
Many other programmers have faced a similar issue; cStringIO,
''.join([mydata]), map( file.write, [mydata]) are but some attempts at
making this process more efficient by jamming the components to be
written into a sequence.
I'm obviously misunderstanding something because I ca
On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote:
> [snip]
>
> Of course, to take advantage of this requires that writev be exposed. I
> have an implementation of writev. This implementation is reasonably
> smart, it "unrolls" only so as many iteration.next calls as ne