Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Substitute partial() if unavailable.

  • Loading branch information...
commit 62bcf9fbafe4845ecd5795df22954472b7cb10f8 1 parent 488689e
@inducer authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 pudb/debugger.py
View
13 pudb/debugger.py
@@ -16,6 +16,18 @@
else:
_next = "next"
+try:
+ from functools import partial
+except ImportError:
+ def partial(func, *args, **keywords):
+ def newfunc(*fargs, **fkeywords):
+ newkeywords = keywords.copy()
+ newkeywords.update(fkeywords)
+ return func(*(args + fargs), **newkeywords)
+ newfunc.func = func
+ newfunc.args = args
+ newfunc.keywords = keywords
+ return newfunc
HELP_TEXT = """\
Welcome to PuDB, the Python Urwid debugger.
@@ -398,7 +410,6 @@ def __init__(self, dbg):
# }}}
- from functools import partial
def change_rhs_box(name, index, direction, w, size, key):
from pudb.settings import save_config
Please sign in to comment.
Something went wrong with that request. Please try again.