Skip to content

Redo some string operations #439

Closed
Closed

Description

@sebastinas

In bpython/curtsiesfrontend/replyplainter.py, some string operations could be simplified by using ljust or format.

In

output_lines.append(border_color(config.left_border+u' ')+((line+' '*(width - len(line)))[:width])+border_color(u' ' + config.right_border))
line+' '*(width - len(line)))[:width]) can be replaced by line.ljust(width)[:width] (untested).

Activity

  1. sebastinas commented on Jan 15, 2015

    @sebastinas
    ContributorAuthor
  2. thomasballinger commented on Jan 20, 2015

    @thomasballinger
    Member

    No longer blocked, Curtsies 0.1.17 adds ljust and rjust that work as described here. (but bpython not updated yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions