Menu

#328 new rule: Unsafe use of list[0..x] instead of take/drop

open
nobody
None
5
2013-02-16
2011-07-18
No

new rule: Unsafe use of list[0..x] instead of take/drop

subscript operator can throw NoSuchElementException.
It is better to use the take method or the drop method.
if the range starts at 0 then use take or drop.

Discussion


Log in to post a comment.