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 callout for way to find methods in IPython #180

Merged
merged 4 commits into from
Jun 20, 2016
Merged

Added callout for way to find methods in IPython #180

merged 4 commits into from
Jun 20, 2016

Conversation

benlaken
Copy link
Contributor

@benlaken benlaken commented Dec 4, 2015

Made a quick note about the object. tab completion feature in IPython and ? help function. I found this to be helpful in the classes in letting them know how they can fend for themselves more quickly with a feature that they might otherwise not find.

Made a quick note about the object. tab completion feature in IPython and ? help function. I found this to be helpful in the classes in letting them know how they can fend for themselves more quickly with a feature that they might otherwise not find.
statkclee pushed a commit to statkclee/python-novice-inflammation that referenced this pull request Jan 4, 2016
Do not render CONTRIBUTING.html. Ignore it if it is built.
@tbekolay
Copy link
Contributor

Currently, the lesson is designed to not require the use of IPython / Jupyter. Would it be possible to reword this callout with other methods? E.g., the use of dir, or links to online documentation?

@benlaken
Copy link
Contributor Author

Using dir() and help() in a regular old Python shell could roughly give the same effect, but it is much less interactive/elegant. Would it be enough to expand this with a further sentence? Such as: "As this is an IPython command, it only works in an IPython terminal or the Jupyter Notebook."

@tbekolay
Copy link
Contributor

We do have one IPython specific callout, so I guess two isn't that different. Could you reword this callout so that it looks similar to the "Some IPython magic" callout on? I.e., starts with "If you’re using an IPython / Jupyter notebook,..." Then perhaps add "IPython" somewhere in the name of the callout, so people not using IPython can skip over it.

Modified callout to emphasise this is an IPython feature.
> with a full-stop then you can use tab completion (e.g. type `data.` and then press tab)
> to see a list of all methods that you can use on that object. After selecting one you
> can also add a question mark (e.g. `data.cumprod?`) and IPython will return an
> explanation of the method!
Copy link
Contributor

Choose a reason for hiding this comment

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

Specifically, the explanation is the output of help(data.cumprod). Maybe it would be good to mention that as it would tie in with the section on writing docstrings?

Added a note that: 1) help(data.cumprod) = data.cumprod?
and 2) that this displays the function's docstring.
fixed quote-mark error in last commit
@valentina-s
Copy link
Contributor

This looks good, thanks! I will merge and remove the reference to docstring (as they have not learned about creating functions and docstrings at this point).

@valentina-s valentina-s merged commit 4f946bc into swcarpentry:gh-pages Jun 20, 2016
zkamvar pushed a commit that referenced this pull request Apr 21, 2023
Added callout for way to find methods in IPython
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

4 participants