R. David Murray added the comment:
By calling 'set.union' you are calling the method on the class. When you call
a method directly on a class object, you have to explicitly pass in 'self'.
Thus the first argument when you call it like that must be a set object.
--
nosy: +r.david.mur
New submission from Stefan Krastanov :
>>> set.union(set([1,2]), [3])
set([1, 2, 3])
>>> set.union([1,2], [3])
TypeError: descriptor 'union' requires a 'set' object but received a 'list'
It seems a bit inconsistent. Is it justified somehow?
--
components: None
messages: 162962
nosy: k