exarkun at twistedmatrix.com writes:
To the OP, you can get view-like behavior with the buffer builtin.
And, on Python 3 (or even the 2.7 in development), you can use the memoryview
builtin for similar effect.
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote:
AIUI, as a python string is imutable, a slice of a string is a
new string which points (C char *) to the start of the slice data
and with a length that is the length of the slice, about 8 bytes
on 32 bit machine.
Not in CPython.
On Tue, Sep 22, 2009 at 7:25 PM, Nobody nob...@nowhere.com wrote:
On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote:
AIUI, as a python string is imutable, a slice of a string is a
new string which points (C char *) to the start of the slice data
and with a length that is the length of
On Wed, 23 Sep 2009 00:25:52 +0100, Nobody wrote:
On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote:
AIUI, as a python string is imutable, a slice of a string is a new
string which points (C char *) to the start of the slice data and with
a length that is the length of the slice,
The mysocket.mysend method given at
http://docs.python.org/howto/sockets.html has an (unwitting?) O(N**2)
complexity for long msg due to the string slicing.
I've been looking for a way to optimize this, but aside from a pure
python 'string slice view' that looks at the original string I can't
On Sep 21, 2:03 pm, Zac Burns zac...@gmail.com wrote:
The mysocket.mysend method given
athttp://docs.python.org/howto/sockets.htmlhas an (unwitting?) O(N**2)
complexity for long msg due to the string slicing.
I've been looking for a way to optimize this, but aside from a pure
python 'string
Zac Burns wrote in news:mailman.211.1253559803.2807.python-l...@python.org
in comp.lang.python:
The mysocket.mysend method given at
http://docs.python.org/howto/sockets.html has an (unwitting?) O(N**2)
complexity for long msg due to the string slicing.
I've been looking for a way to
On 08:00 pm, r...@freenet.co.uk wrote:
Zac Burns wrote in news:mailman.211.1253559803.2807.python-
l...@python.org
in comp.lang.python:
The mysocket.mysend method given at
http://docs.python.org/howto/sockets.html has an (unwitting?) O(N**2)
complexity for long msg due to the string slicing.
On Mon, Sep 21, 2009 at 4:00 PM, Rob Williscroft r...@freenet.co.uk wrote:
AIUI, as a python string is imutable, a slice of a string is a
new string which points (C char *) to the start of the slice data
and with a length that is the length of the slice, about 8 bytes
on 32 bit machine.
Not
wrote in news:mailman.216.1253565002.2807.python-l...@python.org in
comp.lang.python:
Niether of the CPython versions (2.5 and 3.0 (with modified code))
exibited any memory increase between allocated 1 meg + and end
You bumped into a special case that CPython optimizes. s[:] is s. If
On Mon, Sep 21, 2009 at 2:10 PM, Rob Williscroft r...@freenet.co.uk wrote:
wrote in news:mailman.216.1253565002.2807.python-l...@python.org in
comp.lang.python:
Niether of the CPython versions (2.5 and 3.0 (with modified code))
exibited any memory increase between allocated 1 meg + and end
11 matches
Mail list logo