Thank you @Piac, I’ll try that as well.
So these spooky “null” value points are actually valid objects (technically speaking) while conceptually being so called “null-objects”? Well, I’ve heard that name for objects that actually do exist but is meant to represent “null” for invalid data values/structures as to avoid fatal crashes by accidentally referencing nil pointers?
Anyway, whatever method to be used, what I’m looking for is the super fastest possible, since I generate lots of (gh) points on irregular surfaces and need to filter them in several stages in order to gradually “close in” on my target surfaces, which means I have to filter thousands of points in lists.
Q1: are VB.NET scripts faster (assuming that vb script components gets compiled?)
Q2: does GhPython apply “boolean shortcircuit” in expressions like the following code which I call (“NullPtFilter”) for point list?
P = 
for pt in pt_list:
#// collect only valid points :
if pt is not None and (pt.IsValid or (pt is not False) or (pt is not True))