If object has a getdoc() method, override its normal docstring. #1072

Merged
merged 4 commits into from Dec 6, 2011

Projects

None yet

3 participants

@takluyver
Member

Closes gh-89

@fperez
Member
fperez commented Nov 30, 2011

Could you add a short test that validates this behavior? We just need to check:

  • object with docstring 'a' and getdoc() -> 'b', we return 'b'
  • object with docstring 'a' and getdoc() -> None, we return 'a'.

Then we're good to go. Thanks!

@takluyver
Member

Added a test.

@minrk
Member
minrk commented Dec 5, 2011

@takluyver - do you want to add a test for the second case? Which I think is: getdoc is defined but returns None.

@takluyver
Member

Done.

@fperez
Member
fperez commented Dec 6, 2011

Great, this was the last missing piece. Merging now.

@fperez fperez merged commit 8a4e8d9 into ipython:master Dec 6, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment