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

Allow TryNext to have an error message without it affecting the command chain #1703

Merged
merged 1 commit into from May 9, 2012

Conversation

takluyver
Copy link
Member

Closes gh-211

@takluyver
Copy link
Member Author

Test results for commit cdd3c85 merged into master
Platform: linux2

  • python2.7: OK
  • python3.1: OK (libraries not available: matplotlib pymongo qt wx wx.aui zmq)
  • python3.2: Failed, log at https://gist.github.com/2621700 (libraries not available: pymongo wx wx.aui)

Not available for testing: python2.6

@takluyver
Copy link
Member Author

The test failure on 3.2 is issue #1699, nothing to do with this pull request.

"""

def __init__(self, *args, **kwargs):
def __init__(self, _msg="", *args, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

Why is this _msg instead of msg?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because you can give it keyword arguments to pass to the next function in the chain, and it's possible, if unlikely, that you might use msg as a keyword argument. So it deliberately looks special because it's handled differently to other keyword arguments.

@minrk
Copy link
Member

minrk commented May 8, 2012

Test results for commit cdd3c85 merged into master
Platform: darwin

  • python2.6: OK (libraries not available: matplotlib pymongo qt tornado wx wx.aui)
  • python2.7: OK
  • python3.2: OK (libraries not available: matplotlib pymongo qt tornado wx wx.aui)

Not available for testing:

1 similar comment
@minrk
Copy link
Member

minrk commented May 8, 2012

Test results for commit cdd3c85 merged into master
Platform: darwin

  • python2.6: OK (libraries not available: matplotlib pymongo qt tornado wx wx.aui)
  • python2.7: OK
  • python3.2: OK (libraries not available: matplotlib pymongo qt tornado wx wx.aui)

Not available for testing:

@minrk
Copy link
Member

minrk commented May 9, 2012

Seems sensible to me, merging.

minrk added a commit that referenced this pull request May 9, 2012
Allow TryNext to have an error message without it affecting the command chain

added as `_msg`, relaying `**kwargs`

closes #211
@minrk minrk merged commit cb19d0d into ipython:master May 9, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Allow TryNext to have an error message without it affecting the command chain

added as `_msg`, relaying `**kwargs`

closes ipython#211
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.

paste command not working
2 participants