This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients josiahcarlson, pitrou
Date 2008-08-08.22:00:04
SpamBayes Score 2.1853793e-06
Marked as misclassified No
Message-id <1218232801.18022.3.camel@fsol>
In-reply-to <1218231844.2.0.0338218181614.issue3489@psf.upfronthosting.co.za>
Content
Le vendredi 08 août 2008 à 21:44 +0000, Josiah Carlson a écrit :
> Josiah Carlson <josiahcarlson@users.sourceforge.net> added the comment:
> 
> In order for MemoryView to know what bytes it is pointing to in memory,
> it (generally) keeps a pointer with a length.  In order to rotate the
> data without any copies, you need a pointer and length for each rotation
> plus the original.  For example, the equivalent to a rotate left of 8
> characters using slicing is... x[8:] + x[:8].

Hmm, I think it's simpler if the rotate is done in-place rather than
returning a new object. Most uses of memoryviews are going to be with
APIs requiring a single contiguous segment.
(of course for read-only buffers it would raise an error)
History
Date User Action Args
2008-08-08 22:00:52pitrousetrecipients: + pitrou, josiahcarlson
2008-08-08 22:00:05pitroulinkissue3489 messages
2008-08-08 22:00:04pitroucreate