[New-bugs-announce] [issue3800] Fix for formatter.py

skomoroh report at bugs.python.org
Sun Sep 7 09:46:32 CEST 2008


New submission from skomoroh <skomoroh at gmail.com>:

Code:
import formatter
w = formatter.DumbWriter()
f = formatter.AbstractFormatter(w)
f.push_margin('dd')
f.pop_margin()

Result:
Traceback (most recent call last):
  File "formatter_test.py", line 7, in <module>
    f.push_margin('dd')
  File "/usr/local/lib/python3.0/formatter.py", line 261, in push_margin
    self.writer.new_margin(margin, len(fstack))
TypeError: object of type 'filter' has no len()

I've attached the trivial patch for fix it.

----------
components: Library (Lib)
files: formatter.patch
keywords: patch
messages: 72735
nosy: skomoroh
severity: normal
status: open
title: Fix for formatter.py
versions: Python 3.0
Added file: http://bugs.python.org/file11414/formatter.patch

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


More information about the New-bugs-announce mailing list