[PATCH 9 of 9] py3: use single quotes instead of triple quotes so that transformer adds b''

Yuya Nishihara yuya at tcha.org
Fri Jun 23 23:30:37 EDT 2017


On Sat, 24 Jun 2017 01:25:03 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1498238182 -19800
> #      Fri Jun 23 22:46:22 2017 +0530
> # Node ID 22050fe9a887164bb56a0a3cce97087e036a5cb7
> # Parent  aa28c0ebd878a5c3598700efe662d2dfba9b4f60
> py3: use single quotes instead of triple quotes so that transformer adds b''
> 
> diff --git a/mercurial/util.py b/mercurial/util.py
> --- a/mercurial/util.py
> +++ b/mercurial/util.py
> @@ -1168,9 +1168,9 @@
>  
>      return hardlink, num
>  
> -_winreservednames = '''con prn aux nul
> -    com1 com2 com3 com4 com5 com6 com7 com8 com9
> -    lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9'''.split()
> +_winreservednames = 'con prn aux nul\
> +    com1 com2 com3 com4 com5 com6 com7 com8 com9\
> +    lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9'.split()

I slightly prefer b'''...''' over \ escapes. Or we could just write a list
of strings literally.


More information about the Mercurial-devel mailing list