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

Method list

functional/pipeline.py:1377–1393  ·  view source on GitHub ↗

Converts sequence to list of elements. >>> type(seq([]).list()) list >>> type(seq([])) functional.pipeline.Sequence >>> seq([1, 2, 3]).list() [1, 2, 3] :param n: Take n elements of sequence if not None :return: list of elem

(self, n=None)

Source from the content-addressed store, hash-verified

1375 return self.cache().take(n).list()
1376
1377 def list(self, n=None):
1378 """
1379 Converts sequence to list of elements.
1380
1381 >>> type(seq([]).list())
1382 list
1383
1384 >>> type(seq([]))
1385 functional.pipeline.Sequence
1386
1387 >>> seq([1, 2, 3]).list()
1388 [1, 2, 3]
1389
1390 :param n: Take n elements of sequence if not None
1391 :return: list of elements in sequence
1392 """
1393 return self.to_list(n=n)
1394
1395 def to_set(self):
1396 """

Callers 7

tabulateMethod · 0.95
to_listMethod · 0.80
test_pandasMethod · 0.80
test_cartesianMethod · 0.80
test_to_listMethod · 0.80
test_listMethod · 0.80
test_custom_functionsMethod · 0.80

Calls 1

to_listMethod · 0.95

Tested by 5

test_pandasMethod · 0.64
test_cartesianMethod · 0.64
test_to_listMethod · 0.64
test_listMethod · 0.64
test_custom_functionsMethod · 0.64