[PATCH 7 of 9] pycompat: move multiline comments above a function to function doc

Yuya Nishihara yuya at tcha.org
Fri Jun 16 10:10:57 EDT 2017


On Fri, 16 Jun 2017 03:04:49 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1497561497 -19800
> #      Fri Jun 16 02:48:17 2017 +0530
> # Node ID 66940f7bf570ebb3a3a43c556e6887dab28c19a4
> # Parent  a7eaba4f05c56f714af870938252ebf7489845f2
> pycompat: move multiline comments above a function to function doc

> @@ -259,10 +267,12 @@
>      exec('def raisewithtb(exc, tb):\n'
>           '    raise exc, None, tb\n')
>  
> -    # Partial backport from os.py in Python 3, which only accepts bytes.
> -    # In Python 2, our paths should only ever be bytes, a unicode path
> -    # indicates a bug.
>      def fsencode(filename):
> +        """
> +        Partial backport from os.py in Python 3, which only accepts bytes.
> +        In Python 2, our paths should only ever be bytes, a unicode path
> +        indicates a bug.
> +        """

I don't have strong opinion, but this one looks like a real comment, not
a function document.


More information about the Mercurial-devel mailing list