> $ So, the point is - this line can raise an exception, right?
> Yes. In the earlier code, for degree(1); it should raise an exception but not for degree(1,x).
> 
> $ But then, you should do same for elif f.is_number, isn't?
> No. The earlier one gives degree(pi), 0. 

I don't think it make sense.  And it's not backward-compatible, in master:
```
In [4]: degree(1)
...
ComputationFailed: degree(1) failed without generators
In [5]: degree(Integer(1))
...
ComputationFailed: degree(1) failed without generators
In [6]: degree(1, x)
Out[6]: 0
In [7]: degree(Integer(1), x)
Out[7]: 0
In [8]: degree(pi) # but may be this we should count as a bug
Out[8]: 1
```