Changes between Initial Version and Version 1 of Ticket #22561, comment 11


Ignore:
Timestamp:
03/14/17 09:22:50 (5 years ago)
Author:
vdelecroix
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22561, comment 11

    initial v1  
    22> 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.
    33
    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 more appropriate to me.
     4For 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.