Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.158 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.69; '*S*': 0.01; 'python.': 0.02; 'url:github': 0.09; '2.7': 0.13; 'to:name:python-list@python.org': 0.20; 'url:02': 0.22; 'work.': 0.23; 'header:User-Agent:1': 0.26; 'buffers': 0.29; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'message-id:@gmail.com': 0.36; "didn't": 0.36; 'useful': 0.36; 'charset:us-ascii': 0.36; 'detail': 0.37; 'received:209': 0.37; 'brief': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'side': 0.61; 'provide': 0.62; 'information': 0.63; 'decided': 0.65; 'incorporate': 0.65; 'url:10': 0.65; 'wanting': 0.65; 'url:2013': 0.84; 'url:posts': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:user-agent:date:subject:from:to:message-id:thread-topic :mime-version:content-type:content-transfer-encoding; bh=1hjToBjrwKiGmeXYQe7G2VU4Xyzetf55WQfHCfy4oSc=; b=NdluTKYRmLBHxFQGi23hVdPD23HmI9l8KX9JRzjVS6w7U4rSAV0fgiz+mQaWJHnAjg 7Pp4v32tkrSkRUSLHww2wThDEic3iw70aTFx6u0hOy+mgb3/uTpj2xFAFz4GVhWfJpHK McR/52D4gODbMXRRmtexObxDf8HK/hvolBBLoHUs4nQ/fexWV3zElJFEBaYxXJm97/HU HmEwhWaAb5pH3rAqMnvXFVGQwAEef3nPNwdGqQua3ny8ZMC4gVw/eXdKHjMfQbqtuo1+ GU0PVi7R54i4G6j0sV50UjGIL323O0LwFg1/DQq1p8KLGsVptFLyzvzXzfhZw3ScQ+j5 uW9Q== X-Received: by 10.66.73.164 with SMTP id m4mr53561706pav.12.1360682716954; Tue, 12 Feb 2013 07:25:16 -0800 (PST) User-Agent: Microsoft-MacOutlook/14.3.0.121105 Date: Tue, 12 Feb 2013 07:25:05 -0800 Subject: buffers and memoryviews From: Demian Brecht To: "python-list@python.org" Thread-Topic: buffers and memoryviews Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360682725 news.xs4all.nl 6953 [2001:888:2000:d::a6]:60882 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38758 I didn't know a whole lot (read: nothing) about buffers and memoryviews before digging into the C side of Python. Once I found them, ran into some of the 2.7 ugliness of having /both/ buffers and memoryviews available and found the tremendous usefulness in them, I decided to write a blog post. In this post, I hope to give the reader a brief overview of what each is, detail some of the ugliness in 2.7 and provide useful information for those wanting to incorporate them into their work. http://demianbrecht.github.com/posts/2013/02/10/buffer-and-memoryview/ Demian Brecht http://demianbrecht.github.com