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 <d...@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 -- https://mail.python.org/mailman/listinfo/python-list