diff options
| author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-19 14:17:10 +0400 |
|---|---|---|
| committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-19 14:17:10 +0400 |
| commit | 344417db950d6e816ab2efb21737c2bdf9d1ad53 (patch) | |
| tree | 97b00b55be0e28a73399acc0f80e21e6a4e24b28 /sphinx/builders/devhelp.py | |
| parent | 59b355edaa4f17aff910bf2371526d5ce46fb648 (diff) | |
| download | sphinx-344417db950d6e816ab2efb21737c2bdf9d1ad53.tar.gz | |
Modernize the code now that Python 2.5 is no longer supported
- Use print function instead of print statement;
- Use new exception handling;
- Use in operator instead of has_key();
- Do not use tuple arguments in functions;
- Other miscellaneous improvements.
This is based on output of `futurize --stage1`, with some
manual corrections.
Diffstat (limited to 'sphinx/builders/devhelp.py')
| -rw-r--r-- | sphinx/builders/devhelp.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/builders/devhelp.py b/sphinx/builders/devhelp.py index 81d2e6ce..4595c7c2 100644 --- a/sphinx/builders/devhelp.py +++ b/sphinx/builders/devhelp.py @@ -94,7 +94,7 @@ class DevhelpBuilder(StandaloneHTMLBuilder): def istoctree(node): return isinstance(node, addnodes.compact_paragraph) and \ - node.has_key('toctree') + 'toctree' in node for node in tocdoc.traverse(istoctree): write_toc(node, chapters) |
