[issue8153] 'set' union() fails in specific use case

2010-03-17 Thread Frank Rene Schaefer
Frank Rene Schaefer added the comment: Thanks, for the comments. I got it. In German we would say 'I was standing on the water hose' ... That is, something was choking the flow of my thoughts. Best Regards Frank -- ___ Python tracker

[issue8153] 'set' union() fails in specific use case

2010-03-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Frank, try using "update" instead of "union". -- nosy: +rhettinger ___ Python tracker ___ ___ Pyt

[issue8153] 'set' union() fails in specific use case

2010-03-16 Thread Ezio Melotti
Ezio Melotti added the comment: set.union doesn't change the first set (i.e. a), but returns a new sets (i.e. c): >>> def func(): ... a = set([0]) ... a.pop() ... print 'a:', a ... b = set([1, 2]) ... c = a.union(b) ... print 'a:', a ... return c ... >>> func() a: set([]) a: set([

[issue8153] 'set' union() fails in specific use case

2010-03-15 Thread Frank Rene Schaefer
New submission from Frank Rene Schaefer : The union operation fails in the following use case Python 2.6.4 (r264:75706, Jan 30 2010, 22:50:05) [GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]] on linux2 >>> def func(): ... a = set([0]) ... a.pop() ... b = set([1, 2]