Along with this I needed to ask one more thing as for the definition of 
class Zero , there are methods where S.Zero is returned . Has the word Zero 
been hardcoded to 0 somewhere because
I don't understand how that returns value 0 . Similarly is the case with 
`One` also . 

On Saturday, May 17, 2014 6:50:45 AM UTC+5:30, Abhishek K Das wrote:
>
>     def __new__(cls, name, **assumptions):
>         """Symbols are identified by name and assumptions::
>
>
>         >>> from sympy import Symbol
>         >>> Symbol("x") == Symbol("x")
>         True
>         >>> Symbol("x", real=True) == Symbol("x", real=False)
>         False
>
>
>         """
>
>
>         if assumptions.get('zero', False):
>             return S.Zero
>         is_commutative = fuzzy_bool(assumptions.get('commutative', True))
>         if is_commutative is None:
>             raise ValueError(
>                 '''Symbol commutativity must be True or False.''')
>
> I was studying how declaration of Symbol works with the help of winpdb . 
> `name` is for the name of symbol and `assumptions` are the assumptions 
> associated with it .
> What about the cls variable , I didn't understand it's use and what does 
> assumptions.get('zero',False) mean ? 
>

-- 
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/52ea2793-3c7b-43ba-a816-02dd1f804c65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to