Hello,

I was going through how ProductSet is implemented and couple of things
struck me as odd. First, the string/repr representation:

>>> s = FiniteSet(1, 2)
>>> t = FiniteSet(2, 3)
>>> p = ProductSet(s, t)
>>> p
{1, 2} x {2, 3}

IMO, a product set is a set (at least Wikipedia tells me so). So,
shouldn't it rather be the following?

{(1,2), (1,3), (2,2), (2,3)}

Again going by the same idea, I also feel, the len() function should
return the cardinatlity and not raise a TypeError:

>>> len(p)
Traceback (most recent call last):
  File "<pyshell#166>", line 1, in <module>
    len(p)
TypeError: object of type 'ProductSet' has no len()

Best,
Amit.


-- 
http://echorand.me

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CANODV3%3DAmq0TFbOojSUvQwcaRSzZCDMXTZYi4Qypoz6Aqcx9ZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to