[New-bugs-announce] [issue12930] reindent.py inserts spaces in multiline literals

Dima Tisnek report at bugs.python.org
Wed Sep 7 16:29:37 CEST 2011


New submission from Dima Tisnek <dimaqq at gmail.com>:

Given this as input:
#!/usr/bin/python
def x():
  s = """line one
line two
line three"""
  return s

reindent.py changes it to:
#!/usr/bin/python
def x():
    s = """line one
  line two
  line three"""
    return s


Which means that I cannot use reindent.py on any source that includes multiline literals that are not docs.

Btw, it is generally weird that reindented file ends up with 2 spaces before "line two".

----------
components: Demos and Tools
messages: 143679
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: reindent.py inserts spaces in multiline literals
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12930>
_______________________________________


More information about the New-bugs-announce mailing list