@@ -942,7 +942,10 @@ set_update(PySetObject *so, PyObject *args)
942942}
943943
944944PyDoc_STRVAR (update_doc ,
945- "Update a set with the union of itself and others." );
945+ "update($self, /, *others)\n\
946+ --\n\
947+ \n\
948+ Update the set, adding elements from all others." );
946949
947950/* XXX Todo:
948951 If aligned memory allocations become available, make the
@@ -1141,9 +1144,10 @@ set_union(PySetObject *so, PyObject *args)
11411144}
11421145
11431146PyDoc_STRVAR (union_doc ,
1144- "Return the union of sets as a new set.\n\
1147+ "union($self, /, *others)\n\
1148+ --\n\
11451149\n\
1146- (i.e. all elements that are in either set.) " );
1150+ Return a new set with elements from the set and all others. " );
11471151
11481152static PyObject *
11491153set_or (PySetObject * so , PyObject * other )
@@ -1281,9 +1285,10 @@ set_intersection_multi(PySetObject *so, PyObject *args)
12811285}
12821286
12831287PyDoc_STRVAR (intersection_doc ,
1284- "Return the intersection of two sets as a new set.\n\
1288+ "intersection($self, /, *others)\n\
1289+ --\n\
12851290\n\
1286- (i.e. all elements that are in both sets.) " );
1291+ Return a new set with elements common to the set and all others. " );
12871292
12881293static PyObject *
12891294set_intersection_update (PySetObject * so , PyObject * other )
@@ -1312,7 +1317,10 @@ set_intersection_update_multi(PySetObject *so, PyObject *args)
13121317}
13131318
13141319PyDoc_STRVAR (intersection_update_doc ,
1315- "Update a set with the intersection of itself and another." );
1320+ "intersection_update($self, /, *others)\n\
1321+ --\n\
1322+ \n\
1323+ Update the set, keeping only elements found in it and all others." );
13161324
13171325static PyObject *
13181326set_and (PySetObject * so , PyObject * other )
@@ -1470,7 +1478,10 @@ set_difference_update(PySetObject *so, PyObject *args)
14701478}
14711479
14721480PyDoc_STRVAR (difference_update_doc ,
1473- "Remove all elements of another set from this set." );
1481+ "difference_update($self, /, *others)\n\
1482+ --\n\
1483+ \n\
1484+ Update the set, removing elements found in others." );
14741485
14751486static PyObject *
14761487set_copy_and_difference (PySetObject * so , PyObject * other )
@@ -1587,9 +1598,10 @@ set_difference_multi(PySetObject *so, PyObject *args)
15871598}
15881599
15891600PyDoc_STRVAR (difference_doc ,
1590- "Return the difference of two or more sets as a new set.\n\
1601+ "difference($self, /, *others)\n\
1602+ --\n\
15911603\n\
1592- (i.e. all elements that are in this set but not the others.) " );
1604+ Return a new set with elements in the set that are not in the others." );
15931605static PyObject *
15941606set_sub (PySetObject * so , PyObject * other )
15951607{
@@ -1673,7 +1685,10 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other)
16731685}
16741686
16751687PyDoc_STRVAR (symmetric_difference_update_doc ,
1676- "Update a set with the symmetric difference of itself and another." );
1688+ "symmetric_difference_update($self, other, /)\n\
1689+ --\n\
1690+ \n\
1691+ Update the set, keeping only elements found in either set, but not in both." );
16771692
16781693static PyObject *
16791694set_symmetric_difference (PySetObject * so , PyObject * other )
@@ -1694,9 +1709,10 @@ set_symmetric_difference(PySetObject *so, PyObject *other)
16941709}
16951710
16961711PyDoc_STRVAR (symmetric_difference_doc ,
1697- "Return the symmetric difference of two sets as a new set.\n\
1712+ "symmetric_difference($self, other, /)\n\
1713+ --\n\
16981714\n\
1699- (i.e. all elements that are in exactly one of the sets.) " );
1715+ Return a new set with elements in either the set or other but not both. " );
17001716
17011717static PyObject *
17021718set_xor (PySetObject * so , PyObject * other )
@@ -2100,8 +2116,8 @@ static PyNumberMethods set_as_number = {
21002116};
21012117
21022118PyDoc_STRVAR (set_doc ,
2103- "set() -> new empty set object \n\
2104- set(iterable) -> new set object \n\
2119+ "set(iterable=(), /) \n\
2120+ -- \n\
21052121\n\
21062122Build an unordered collection of unique elements." );
21072123
@@ -2201,8 +2217,8 @@ static PyNumberMethods frozenset_as_number = {
22012217};
22022218
22032219PyDoc_STRVAR (frozenset_doc ,
2204- "frozenset() -> empty frozenset object \n\
2205- frozenset(iterable) -> frozenset object \n\
2220+ "frozenset(iterable=(), /) \n\
2221+ -- \n\
22062222\n\
22072223Build an immutable unordered collection of unique elements." );
22082224
0 commit comments