From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15711 invoked by alias); 27 Mar 2009 17:43:46 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 15700 invoked by uid 22791); 27 Mar 2009 17:43:45 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49CD1045.5070301@redhat.com> Date: Fri, 27 Mar 2009 17:43:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Tom Tromey CC: Project Archer Subject: Re: [python][rfc] Attempt to print the base class if a there is no Python pretty-printer for a derived class. References: <49CD0730.8070000@redhat.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2009-q1/txt/msg00425.txt.bz2 Tom Tromey wrote: > Looking pretty good :) > > Phil> + /* Attempt to run the Python pretty-printers on the base class of > Phil> + the derived class. */ > > The second line here needs more indentation. > "the" should line up with "Attempt". > Also you need an extra space after the period. > > Silly nit-picking... :) > Thanks. > Phil> + if (!options->raw) > Phil> + if (n_baseclasses > 0) > Phil> + { > Phil> + > > Declare baseclass and result here, not at the top of the function. > You know I just moved it from here, I guess I'll move it back ;) > Phil> /* First, print out baseclasses such that we don't print > Phil> duplicates of virtual baseclasses. */ > > Does this logic continue to work properly if one of the virtual > baseclasses has a pretty-printer? > It works in so much as this is a "do or continue with the old logic"; the existing Python pretty-printers would handle these if they were called, no? (I might misunderstand your question) But good point it needs a test ... > Please write a couple test cases for this functionality. > Yeah this is not a full patch (though looking at it, it does look like one). It's mainly a request for comments and a methodology sanity check ;) I was thinking of a documentation patch in the narrative regarding printer selection too. But is this just going to be superfluous to the reader? Regards Phil