Received: from eggs.gnu.org ([2001:4830:134:3::10]:43825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlYP4-0007ys-As for qemu-devel@nongnu.org; Mon, 12 Oct 2015 04:24:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlYP0-0004fo-4k for qemu-devel@nongnu.org; Mon, 12 Oct 2015 04:24:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlYOz-0004fB-UV for qemu-devel@nongnu.org; Mon, 12 Oct 2015 04:24:14 -0400 From: Markus Armbruster References: <1443930073-19359-1-git-send-email-eblake@redhat.com> <1443930073-19359-6-git-send-email-eblake@redhat.com> <874mi2ws4q.fsf@blackfin.pond.sub.org> <5619721A.9070605@redhat.com> Date: Mon, 12 Oct 2015 10:24:11 +0200 In-Reply-To: <5619721A.9070605@redhat.com> (Eric Blake's message of "Sat, 10 Oct 2015 14:16:26 -0600") Message-ID: <878u787avo.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v7 05/14] qapi: Lazy creation of array types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Michael Roth , marcandre.lureau@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com Eric Blake writes: > On 10/07/2015 10:38 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Commit ac88219a had several TODO markers about whether we needed >>> to automatically create the corresponding array type alongside >>> any other type. It turns out that most of the time, we don't! >>> > >>> + def _make_simple_variant(self, case, typ, info): >>> if isinstance(typ, list): >>> assert len(typ) == 1 >>> - typ = self._make_array_type(typ[0]) >>> - typ = self._make_implicit_object_type(typ, 'wrapper', >>> - [self._make_member('data', typ)]) >>> + typ = self._make_array_type(typ[0], info) >>> + typ = self._make_implicit_object_type( >>> + typ, 'wrapper', [self._make_member('data', typ, info)]) >> >> I'd indent the hanging intent a bit more, to make the = stand out. > > pep8 doesn't like it: > > scripts/qapi.py:1299:17: E126 continuation line over-indented for > hanging indent Meh. See also https://github.com/PyCQA/pep8/issues/167 > but it was okay with: > > type = (self._make_implicit_object_type( > type, ...)) > > and that does look a little better. I find it a bit stilted. Let's stick with your first version.