Where is ^ (symmetric_difference) documented in help()?
Peng Yu
pengyu.ut at gmail.com
Fri Dec 22 23:50:28 EST 2017
Where is it documented that __xor__ and ^ is the same as
symmetric_difference? Thanks.
BTW, I am using to Python 2, your help message is different from mine.
Do you use Python 3?
On Fri, Dec 22, 2017 at 9:41 PM, Dan Sommers <dan at tombstonezero.net> wrote:
> On Fri, 22 Dec 2017 21:35:53 -0600, Peng Yu wrote:
>
>> Hi, I see the following two lines are the same. But I'd like to find
>> where ^ is documented via the help() function (I am not looking for
>> the document in html)? Does anybody know? Thanks.
>>
>> s.symmetric_difference(t)
>> s ^ t
>
> It's sort of documented in help(set):
>
> | __xor__(self, value, /)
> | Return self^value.
>
> HTH,
> Dan
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Regards,
Peng
More information about the Python-list
mailing list