bkg = map(lambda x: x / 255.0, [26, 51, 102, 255])
colors.SetColor("BkgColor", *bkg)
#This is a class of the VTK library that sets the color properties of an actor
colors.SetColor("BkgColor", *bkg)
I'm having an issue with iterator references while learning open source code, the main issues are as follows:
First map returns an iterator, then the second SetColor parameter below asks for the color values of the three channels and the range of the three values. It is clear that the above list has preset these four input values.
The first question, what is the way to ask the iterator "*bkg", which is a bit like the way C++ asks the iterator currently pointing to the value?
The second question is, does the iterator of bkg perform a value reference after all 4 values are calculated, or does it perform a value operation when it is necessary to reference bkg? The third question, I am not proficient enough in the use of iterators, is there any way to debug and analyze iterators?
I tried using print or direct breakpoint debugging to see bkg, but it didn't seem to work very well.And after printing, the later setColor cannot be used.