MCPcopy Create free account
hub / github.com/comaps/comaps / example__features_generator

Function example__features_generator

tools/python/mwm/mwm_test.py:41–62  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

39
40
41def example__features_generator(path):
42 def make_gen(path):
43 return (ft for ft in mwm.Mwm(path))
44
45 cnt = 0
46 print("Names of several first features:")
47 for ft in make_gen(path):
48 print(ft.names())
49 if cnt == 5:
50 break
51
52 cnt += 1
53
54 def return_ft(num):
55 cnt = 0
56 for ft in mwm.Mwm(path):
57 if cnt == num:
58 return ft
59
60 cnt += 1
61
62 print(return_ft(10))
63
64
65def example__sequential_processing(path):

Callers 1

mainFunction · 0.70

Calls 3

make_genFunction · 0.70
return_ftFunction · 0.70
namesMethod · 0.45

Tested by

no test coverage detected