On Fri, Jan 9, 2009 at 3:38 PM, Mike Hansen <mhan...@gmail.com> wrote:
>
> On Fri, Jan 9, 2009 at 3:36 PM, John H Palmieri <jhpalmier...@gmail.com> 
> wrote:
>>
>> Is this a bug?
>>
>> sage: Set([])
>> {}
>> sage: Set(Set([]))
>> {}
>> sage: Set([]) == Set(Set([]))
>> True
>
> This is because Set takes a list (iterable) for all the of the
> elements of the set.  So, if you want to construct the set containing
> the empty set, you'd do the following:
>
> sage: e = Set([])
> sage: ee = Set([e])
> sage: e
> {}
> sage: ee
> {{}}
> sage: e == ee
> False

Yep.  Think "coercion" -- Set(foo) makes foo into a set.
It doesn't make the set containing foo.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to