[issue32349] Add detailed return value information for set.intersection function

2017-12-18 Thread 양유석
양유석 added the comment: Ok, I got a point of implementation-dependent things. Thank you for comments. -- ___ Python tracker ___

[issue32349] Add detailed return value information for set.intersection function

2017-12-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: The implementation detail is not documented because it is not guaranteed. The behavior has changed over time and other implementation are allowed to do something different. For example, collections.abc.Set.__and__ has

[issue32349] Add detailed return value information for set.intersection function

2017-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: To clarify, are you referring to this behaviour? >>> a = {1, 2, 3} >>> b = {1.0, 4.0} >>> a.intersection(b) # expect {1} {1.0} I'd personally expect this to be implementation-dependent: since for set operations you usually only care

[issue32349] Add detailed return value information for set.intersection function

2017-12-16 Thread 양유석
New submission from 양유석 : I think it's intentional behavior seems to be minor though. At a glance, I assume that a.set(b) should return items in a. But I found out the implementation always return items in smaller set. There is no issue for common case, but custom class can