The assumptions system will try to call `_eval_is_foo` if it exists for the
object. So if you add definitions for ``_eval_is_integer` to your Routine
object you can return the value of `is_integer` for the return value. I
suspect there will be issues with how you define Routine, however, since i
>
> it looks like in the first example that the expression is returned
> directly while in the second case it is not(?)
Ideally, for routines with one expr, `routine` and `routine[0]` will be
identical. Not sure if this is possible, and I may decide that's too much
magic. The main purpose behind
On Fri, Sep 19, 2014 at 9:20 AM, James Crist wrote:
>> it looks like in the first example that the expression is returned
>> directly while in the second case it is not(?)
>
>
> Ideally, for routines with one expr, `routine` and `routine[0]` will be
> identical. Not sure if this is possible, and I
On Fri, Sep 19, 2014 at 1:52 PM, Aaron Meurer wrote:
> On Fri, Sep 19, 2014 at 9:20 AM, James Crist wrote:
>>> it looks like in the first example that the expression is returned
>>> directly while in the second case it is not(?)
>>
>>
>> Ideally, for routines with one expr, `routine` and `routine
So I've spent some time trying to get this to work, and am still
struggling. Here's what I've tried:
1.) Subclass from `Expr`. Define `__getattr__`, and alias calls over to the
base expr. Unfortunately, `__getattr__` is only called for attributes that
are missing, and since all the `is_*` attri
Finally figured this all out (at least for everything I've tried it works).
Option #3 described above was almost correct. Instead of setting the
`_assumptions` attributes equal between the alias and the expression
though, the `_assumptions` attribute should be cleared for the alias. If it
has a