Skip to content
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

Added assert msg to extract_hist_ranges() #2966

Merged
merged 2 commits into from Feb 22, 2013

Conversation

joonro
Copy link
Contributor

@joonro joonro commented Feb 22, 2013

Added informative message to the assert endsess >= startsess in extract_hist_ranges()

@@ -776,7 +776,8 @@ def extract_hist_ranges(ranges_str):
endsess = rmatch.group("endsess") or startsess
startsess = int(startsess.replace("~","-"))
endsess = int(endsess.replace("~","-"))
assert endsess >= startsess
assert endsess >= startsess, ("start session must be older than end "
"session")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cases like this, just go a few characters over the end of the line. We're not too strict about line limits, and this just looks awkward.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

takluyver added a commit that referenced this pull request Feb 22, 2013
Added assert msg to extract_hist_ranges()
@takluyver takluyver merged commit 71e77a8 into ipython:master Feb 22, 2013
@takluyver
Copy link
Member

Thanks, merged.

@joonro joonro deleted the history-extract-assert-msg branch February 22, 2013 19:19
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants