Number of polygons in a region

I am very happy, that KLayout has such a powerful Python API! As it seems to be work in progress, though, it has some obvious features missing I guess. Is there a simpler (and perhaps more efficient) way to get number of polygons in a region than following?

len([p for p in reg.each()])

Comments

Sign In or Register to comment.