I need some extra eyes. I can't see how changing the "if 1" to "if 0"
causes pickling to fail without ever returning anything different for
ans and result. This comes from basic.py, (the is_number method) at
github/smichr/2052


    @property
    def is_number(self):
        result = False
        for obj in self.iter_basic_args():
            if obj.is_number:
                result = True
            else:
                result = False
                break
        if 1: # if 0 the lower code will calculate the result, too
            return result
        def my():
            if not self.args:
                # Atoms has its own method
                return False
            if all(obj.is_number for obj in self.iter_basic_args()):
                return True

            for s in self.symbols:
                if self.diff(s).expand(mul=1): # if not zero for 1
then not zero overall
                    return False
            return True
        ans = my()
        assert ans == result
        return ans

Does anyone have an idea of what I am missing?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to