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

Dedent prefix bugfix + tests: #142 #346

Merged
merged 2 commits into from Apr 10, 2011
Merged

Dedent prefix bugfix + tests: #142 #346

merged 2 commits into from Apr 10, 2011

Conversation

dwf
Copy link
Contributor

@dwf dwf commented Apr 9, 2011

Re: issue #142, this expands the inputsplitter regex for 'dedentation' to correctly handle ignore lines such as "passes += 1", which should not dedent even though it begins with "pass". It's fine with arbitrary trailing whitespace and a few other wacky corner cases (return() is valid Python, as is return(0), same with raise(TypeError()), etc. -- these only dedent if you at least have a close paren after the open paren.)

Also adds tests for these new behaviours.

@takluyver
Copy link
Member

Works for me. Thanks, David.

@dwf
Copy link
Contributor Author

dwf commented Apr 10, 2011

Okay, I think I've got the hang of it. It appears you can have a period afterward and it will still work (tested in a dummy project). Sorry if anyone got flooded with email. :P

@fperez fperez merged commit 2b92905 into ipython:master Apr 10, 2011
@fperez
Copy link
Member

fperez commented Apr 10, 2011

Thanks a lot David! Merged and pushed. Good luck with those exams :)

@dwf
Copy link
Contributor Author

dwf commented Apr 10, 2011

On 2011-04-10, at 2:43 AM, fperez wrote:

Thanks a lot David! Merged and pushed. Good luck with those exams :)

Reply to this email directly or view it on GitHub:
#346 (comment)

Very welcome. Thankfully it's exam, singular, and minor IPython hacking is proving to make for refreshing breaks from graph theory/dynamic programming proofs. :)

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

3 participants