diff options
Diffstat (limited to 'modules/language/python')
-rw-r--r-- | modules/language/python/format2.scm | 11 | ||||
-rw-r--r-- | modules/language/python/module/optparse.py | 4 |
2 files changed, 2 insertions, 13 deletions
diff --git a/modules/language/python/format2.scm b/modules/language/python/format2.scm index 22cb318..eb6b8d0 100644 --- a/modules/language/python/format2.scm +++ b/modules/language/python/format2.scm @@ -57,6 +57,7 @@ "x"))) (let ((prec (if prec prec 6)) + (min (if min min 0)) (c (if c c ""))) (match tp ("c" @@ -220,15 +221,7 @@ ((#:% #f c min #:* _ tp) (lambda (prec x) ((create c min prec tp) x))) - - ((#:% #f (and c (or "s" "r" "a")) min prec _ tp) - (create c 0 prec tp)) - - ((#:% tag (and c (or "s" "r" "a")) min prec _ tp) - (let ((f (create c 0 prec tp))) - (lambda (x) - (f (pylist-ref x tag))))) - + ((#:% #f c min prec _ tp) (create c min prec tp)) ((#:% tag c min prec _ tp) diff --git a/modules/language/python/module/optparse.py b/modules/language/python/module/optparse.py index 657c97d..043ea9a 100644 --- a/modules/language/python/module/optparse.py +++ b/modules/language/python/module/optparse.py @@ -380,11 +380,9 @@ class IndentedHelpFormatter (HelpFormatter): self, indent_increment, max_help_position, width, short_first) def format_usage(self, usage): - pk('IndentedHelpFormatter usage') return _("Usage: %s\n") % usage def format_heading(self, heading): - pk('IndentedHelpFormatter heading') return "%*s%s:\n" % (self.current_indent, "", heading) @@ -401,11 +399,9 @@ class TitledHelpFormatter (HelpFormatter): self, indent_increment, max_help_position, width, short_first) def format_usage(self, usage): - pk('TitledHelpFormatter heading') return "%s %s\n" % (self.format_heading(_("Usage")), usage) def format_heading(self, heading): - pk('TitledHelpFormatter heading') return "%s\n%s\n" % (heading, "=-"[self.level] * len(heading)) |