From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysvma-0000o0-8F for qemu-devel@nongnu.org; Thu, 14 May 2015 12:14:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsvmW-0001Am-Si for qemu-devel@nongnu.org; Thu, 14 May 2015 12:14:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsvmW-0001AE-Ku for qemu-devel@nongnu.org; Thu, 14 May 2015 12:14:44 -0400 From: Markus Armbruster References: <1431607862-9238-1-git-send-email-eblake@redhat.com> <1431607862-9238-9-git-send-email-eblake@redhat.com> <5554C1C0.7010903@redhat.com> Date: Thu, 14 May 2015 18:13:59 +0200 In-Reply-To: <5554C1C0.7010903@redhat.com> (Eric Blake's message of "Thu, 14 May 2015 09:39:44 -0600") Message-ID: <87617vuofs.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v4 08/16] qapi: Tidy c_type logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, akong@redhat.com, berto@igalia.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Eric Blake writes: > On 05/14/2015 06:50 AM, Eric Blake wrote: >> c_type() is designed to be called on both string names and on >> array designations, so 'name' is a bit misleading because it >> operates on more than strings. Also, no caller ever passes >> an empty string. Finally, + notation is a bit nicer to read >> than '%s' % value for string concatenation. >> >> Signed-off-by: Eric Blake >> >> --- > >> else: >> - return '%s *%s' % (name, eatspace) >> + # complex type name >> + assert isinstance(value, str) and str != "" > > D'oh - that should be 'value != ""'. You're right! Missed it in my review... I'll fix it up on commit. While there, I'll indulge in a bit of OCD and append () to c_type in the subject, if you don't mind.