Message178016
Comparing the docstrings with the on-line documentation, I have found that, in addition to the already mentioned issue, the fact that many methods only require the first argument to be a set (or frozenset) object is not mentioned anywhere in the docstrings. Would it be useful if I write here a list of all the cases where this happens, and a possible alternative? An example:
Python 2.7
set.union
current docstring:
"""Return the union of sets as a new set.
(i.e. all elements that are in either set.)"""
possible enhancement:
"""union(set1, *iterables) --> new set
Return a new set with elements from set1 and all the iterables."""
Would it be a good idea to create a different docstring for the bound method? E.g:
unbound version:
"""union(set1, *iterables) --> new set
Return a new set with elements from set1 and all the iterables."""
bound version:
"""set1.union(*iterables) --> new set
Return a new set with elements from set1 and all the iterables."""
If writing this list would be useful, please tell me so, and I will do it. Thanks for your time! |
|
Date |
User |
Action |
Args |
2012-12-23 20:51:25 | turgon | set | recipients:
+ turgon, georg.brandl, rhettinger, belopolsky |
2012-12-23 20:51:25 | turgon | set | messageid: <1356295885.53.0.985468368404.issue7263@psf.upfronthosting.co.za> |
2012-12-23 20:51:25 | turgon | link | issue7263 messages |
2012-12-23 20:51:25 | turgon | create | |
|