MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / drop

Method drop

functional/pipeline.py:371–384  ·  view source on GitHub ↗

Drop the first n elements of the sequence. >>> seq([1, 2, 3, 4, 5]).drop(2) [3, 4, 5] :param n: number of elements to drop :return: sequence without first n elements

(self, n)

Source from the content-addressed store, hash-verified

369 )
370
371 def drop(self, n):
372 """
373 Drop the first n elements of the sequence.
374
375 >>> seq([1, 2, 3, 4, 5]).drop(2)
376 [3, 4, 5]
377
378 :param n: number of elements to drop
379 :return: sequence without first n elements
380 """
381 if n <= 0:
382 return self._transform(transformations.drop_t(0))
383 else:
384 return self._transform(transformations.drop_t(n))
385
386 def drop_right(self, n):
387 """

Callers 2

aggregateMethod · 0.95
test_dropMethod · 0.80

Calls 1

_transformMethod · 0.95

Tested by 1

test_dropMethod · 0.64