Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: [OT] Quick intro to C++ for a Python and C user? Date: Tue, 20 Dec 2011 20:51:29 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 29 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1324414289 2926 64.122.56.22 (20 Dec 2011 20:51:29 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 20 Dec 2011 20:51:29 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17616 On 2011-12-20, Grant Edwards wrote: > Would anybody care to recommend online C++ resources for a long time C > and Python user? (I'm also familiar with Smalltalk, Scheme, FORTRAN, > bash, Javascript, and a variety of assembly languages.) > > I have a C++ library to which I need to add a couple minor > wrappers/extensions. I've already done the same for the C version of > the library. Writing test suites for C libraries using Python/ctypes > is pretty cool. :) I stumbled across an undergrad CSci lesson that showed in a couple pages how to subclass something and add a couple methods. All I needed to do was add four methods containing two lines of code each. Unfortunately, I had to muck about with the original library's code to change a couple things from "private" to "protected" to allow me to extend the class to do what needed to be done. Every time I have to do anything with C++ (once every handfull of years) it feels like swimming against the current... It probably would have been simpler to just add the code to the original library's implementation, but that would have introduced a "backwards" dependency in the system's libraries. -- Grant Edwards grant.b.edwards Yow! A dwarf is passing out at somewhere in Detroit! gmail.com