Re: sets anomaly

2016-12-07 Thread Steven D'Aprano
On Thursday 08 December 2016 02:17, Rustom Mody wrote: > Trying to write some code using sets (well frozen sets) > And was hit by this anomaly > > This is the behavior of lists I analogously expect in sets: > [] > [] [[]] > [[]] > > ie the empty list and the list of the empty li

Re: sets anomaly

2016-12-07 Thread MRAB
On 2016-12-07 15:33, Ned Batchelder wrote: On Wednesday, December 7, 2016 at 10:18:32 AM UTC-5, Rustom Mody wrote: Trying to write some code using sets (well frozen sets) And was hit by this anomaly This is the behavior of lists I analogously expect in sets: >>> [] [] >>> [[]] [[]] >>> ie the

Re: sets anomaly

2016-12-07 Thread Ned Batchelder
On Wednesday, December 7, 2016 at 10:18:32 AM UTC-5, Rustom Mody wrote: > Trying to write some code using sets (well frozen sets) > And was hit by this anomaly > > This is the behavior of lists I analogously expect in sets: > > >>> [] > [] > >>> [[]] > [[]] > >>> > > ie the empty list and the l

sets anomaly

2016-12-07 Thread Rustom Mody
Trying to write some code using sets (well frozen sets) And was hit by this anomaly This is the behavior of lists I analogously expect in sets: >>> [] [] >>> [[]] [[]] >>> ie the empty list and the list of the empty list are different things However (with f= frozenset ) >>> f() frozenset() >>