[issue7263] Fix set.intersection docstring

2012-12-23 Thread Juan Benavente Ponce

Juan Benavente Ponce added the comment:

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!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7263] Fix set.intersection docstring

2012-12-23 Thread Juan Benavente Ponce

Juan Benavente Ponce added the comment:

set.intersection and frozenset.intersection docstrings are back to the wrong 
two-sets-only version in Python 3.3 (Python 2.7 is not affected):

"""
intersection(...)
Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)
"""

 The correct docstring should be the one already submitted by Alexander 
Belopolsky:

"""
intersection(...)
Return the intersection of two or more sets as a new set.

(i.e. all elements that are in all sets.)
"""

 Thanks everyone for your great work and Merry Christmas!

--
nosy: +turgon
versions: +Python 3.3 -Python 2.7, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7263] Fix set.intersection docstring

2009-11-18 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7263] Fix set.intersection docstring

2009-11-04 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: georg.brandl -> rhettinger
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7263] Fix set.intersection docstring

2009-11-04 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

"""
intersection(...)
Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)
"""

Is incorrect because set.intersection takes two or more sets.

Attached patch changes that to

"""
intersection(...)
Return the intersection of two or more sets as a new set.

(i.e. all elements that are in all sets.)
"""

--
assignee: georg.brandl
components: Documentation
files: set-intersection-doc.diff
keywords: patch
messages: 94892
nosy: belopolsky, georg.brandl
severity: normal
status: open
title: Fix set.intersection docstring
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15257/set-intersection-doc.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com