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

Function example__features_generator

generator/pygen/example.py:40–61  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

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