Changes between Initial Version and Version 1 of Ticket #22561, comment 11
 Timestamp:
 03/14/17 09:22:50 (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #22561, comment 11
initial v1 2 2 > Although it is wonderful to have `__iter__`, I still think that `__getitem__` should raise an `IndexError` if one tries to access a t_POL coefficient with negative index, or index larger than the degree. This just makes sense, and also is consistent with how it works for power series. 3 3 4 For the power series `1 + O(x^5)`, the `__getitem__` should only raise `IndexError` for indices greater or equal than `5`. It is not related to the actual degree of the underlying polynomial but the precision. One can think of a polynomial as `p + O(x^infinity)` and hence no `IndexError` looks the mo reappropriate to me.4 For the power series `1 + O(x^5)`, the `__getitem__` should only raise `IndexError` for indices greater or equal than `5`. It is not related to the actual degree of the underlying polynomial but the precision. One can think of a polynomial as `p + O(x^infinity)` and hence no `IndexError` looks the most appropriate to me.