Where is the documentation for ','?

Peng Yu pengyu.ut at gmail.com
Fri Sep 16 22:29:59 EDT 2016


help(tuple) gives me this, which does not mention ',' either.

Help on class tuple in module __builtin__:

class tuple(object)
 |  tuple() -> empty tuple
 |  tuple(iterable) -> tuple initialized from iterable's items
 |
 |  If the argument is a tuple, the return value is the same object.
 |
 |  Methods defined here:
 |
 |  __add__(...)
 |      x.__add__(y) <==> x+y
 |
 |  __contains__(...)
 |      x.__contains__(y) <==> y in x
 |
 |  __eq__(...)
 |      x.__eq__(y) <==> x==y
 |
 |  __ge__(...)
 |      x.__ge__(y) <==> x>=y
 |
 |  __getattribute__(...)
 |      x.__getattribute__('name') <==> x.name
 |
 |  __getitem__(...)
 |      x.__getitem__(y) <==> x[y]
 |
 |  __getnewargs__(...)
 |
 |  __getslice__(...)
 |      x.__getslice__(i, j) <==> x[i:j]
 |
 |      Use of negative indices is not supported.
 |
 |  __gt__(...)
 |      x.__gt__(y) <==> x>y
 |
 |  __hash__(...)
 |      x.__hash__() <==> hash(x)
 |
 |  __iter__(...)
 |      x.__iter__() <==> iter(x)
 |
 |  __le__(...)
 |      x.__le__(y) <==> x<=y
 |
 |  __len__(...)
 |      x.__len__() <==> len(x)
 |
 |  __lt__(...)
 |      x.__lt__(y) <==> x<y
 |
 |  __mul__(...)
 |      x.__mul__(n) <==> x*n
 |
 |  __ne__(...)
 |      x.__ne__(y) <==> x!=y
 |
 |  __repr__(...)
 |      x.__repr__() <==> repr(x)
 |
 |  __rmul__(...)
 |      x.__rmul__(n) <==> n*x
 |
 |  count(...)
 |      T.count(value) -> integer -- return number of occurrences of value
 |
 |  index(...)
 |      T.index(value, [start, [stop]]) -> integer -- return first
index of value.
 |      Raises ValueError if the value is not present.
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __new__ = <built-in method __new__ of type object>
 |      T.__new__(S, ...) -> a new object with type S, a subtype of T



On Fri, Sep 16, 2016 at 9:13 PM, MRAB <python at mrabarnett.plus.com> wrote:
> On 2016-09-17 03:05, Peng Yu wrote:
>>
>> Hi,
>>
>> I'm wondering where is the documentation for ',' as in the following
>> usage.
>>
>> x = 1
>> y = 2
>> x, y = y, x
>>
>> I tried help(','). But there are too many ',' in it and I don't see in
>> which section ',' is documented. Could anybody let me know? Thanks.
>>
> Search for 'tuple' instead.
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
Regards,
Peng



More information about the Python-list mailing list