This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akshetp
Recipients akshetp
Date 2015-03-30.11:58:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427716738.06.0.245811504272.issue23811@psf.upfronthosting.co.za>
In-reply-to
Content
On the following test file (test.py):

```python
class Solution:
  def repeatedNumber(self, A):
    test = 1
      return []
```

Running python -m py_compile test.py return the following error message:
Sorry: IndentationError: unexpected indent (test.py, line 6)

But without a newline on stderr at the end of the message. This causes some problems with scripts that expect a newline and new my particular case with reading stderr on docker where docker just ignore the line if it doesn't end in a newline.

Also, this message differs from the runtime error message:

```
  File "test.py", line 6
    return []
    ^
IndentationError: unexpected indent
```

Would it be possible to at least add in a newline and at best, change the message to be consistent with the runtime error message?

I will trying to look at the code and see if I can write a patch but it will take me some time.
History
Date User Action Args
2015-03-30 11:58:58akshetpsetrecipients: + akshetp
2015-03-30 11:58:58akshetpsetmessageid: <1427716738.06.0.245811504272.issue23811@psf.upfronthosting.co.za>
2015-03-30 11:58:58akshetplinkissue23811 messages
2015-03-30 11:58:57akshetpcreate