Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove a redundant comparison that raises an exception in Python 3 #2685

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

Merged
merged 1 commit into from
Dec 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove a redundant comparison that raises an exception in Python 3
sphinx.__version__ is a string, 1.1 is a float: the comparison always
returns True in Python 2. In Python 3 however the

> <, <=, > and >= operators will raise a TypeError exception when
> comparing a complex number with another built-in numeric type, when
> the objects are of different types that cannot be compared, or in
> other cases where there is no defined ordering

[0]. str and float are such unorderable types.

[0] http://docs.python.org/3.3/library/stdtypes.html#comparisons
  • Loading branch information
mineo committed Dec 16, 2013
commit cbdb3a1fcf4e05c70c0e8e3888c54d03386b8c20
3 changes: 1 addition & 2 deletions 3 doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@

autosummary_generate = True

if sphinx.__version__ >= 1.1:
autodoc_docstring_signature = True
autodoc_docstring_signature = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.