Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for formatter.py #48050

Closed
skomoroh mannequin opened this issue Sep 7, 2008 · 2 comments
Closed

Fix for formatter.py #48050

skomoroh mannequin opened this issue Sep 7, 2008 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@skomoroh
Copy link
Mannequin

skomoroh mannequin commented Sep 7, 2008

BPO 3800
Nosy @birkenfeld
Files
  • formatter.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-09-09.19:32:09.904>
    created_at = <Date 2008-09-07.07:46:31.483>
    labels = ['library']
    title = 'Fix for formatter.py'
    updated_at = <Date 2008-09-09.19:32:09.884>
    user = 'https://bugs.python.org/skomoroh'

    bugs.python.org fields:

    activity = <Date 2008-09-09.19:32:09.884>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-09-09.19:32:09.904>
    closer = 'georg.brandl'
    components = ['Library (Lib)']
    creation = <Date 2008-09-07.07:46:31.483>
    creator = 'skomoroh'
    dependencies = []
    files = ['11414']
    hgrepos = []
    issue_num = 3800
    keywords = ['patch']
    message_count = 2.0
    messages = ['72735', '72899']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'skomoroh']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3800'
    versions = ['Python 3.0']

    @skomoroh
    Copy link
    Mannequin Author

    skomoroh mannequin commented Sep 7, 2008

    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.

    @skomoroh skomoroh mannequin added the stdlib Python modules in the Lib dir label Sep 7, 2008
    @birkenfeld
    Copy link
    Member

    Thanks, fixed in r66348.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant