Eric Blake <ebl...@redhat.com> writes: > On 02/02/2018 07:03 AM, Markus Armbruster wrote: >> Each generator carries a copyright notice for the generator itself, >> and another one for the files it generates. Only the former have been >> updated along the way, the latter have not, and are all out of date. >> >> Fix by copying the generator's copyright notice to the generated files >> instead. >> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> >> --- > >> +++ b/scripts/qapi-commands.py >> @@ -1,16 +1,17 @@ >> -# >> -# QAPI command marshaller generator >> -# >> -# Copyright IBM, Corp. 2011 >> -# Copyright (C) 2014-2016 Red Hat, Inc. >> -# >> -# Authors: >> -# Anthony Liguori <aligu...@us.ibm.com> >> -# Michael Roth <mdr...@linux.vnet.ibm.com> >> -# Markus Armbruster <arm...@redhat.com> >> -# >> -# This work is licensed under the terms of the GNU GPL, version 2. >> -# See the COPYING file in the top-level directory. >> +""" >> +QAPI command marshaller generator >> + >> +Copyright IBM, Corp. 2011 >> +Copyright (C) 2014-2018 Red Hat, Inc. >> + >> +Authors: >> + Anthony Liguori <aligu...@us.ibm.com> >> + Michael Roth <mdr...@linux.vnet.ibm.com> >> + Markus Armbruster <arm...@redhat.com> >> + >> +This work is licensed under the terms of the GNU GPL, version 2. >> +See the COPYING file in the top-level directory. >> +""" > > So python lets you start a file with a string constant that is not > associated with any variable name?
It's the module's doc string, done the same way as function doc strings. https://www.python.org/dev/peps/pep-0257/#what-is-a-docstring >> (fdef, fdecl) = open_output(output_dir, do_c, do_h, prefix, >> 'qmp-marshal.c', 'qmp-commands.h', >> - blurb) >> + blurb, __doc__) > > Ah, and there's what I was missing - python auto-assigns such an initial > string to a magic automatic variable. Cool language feature I hadn't > seen before! > > Reviewed-by: Eric Blake <ebl...@redhat.com> Thanks!