3 ms·
Is None OK in Python? NULL in C just doesn’t belong at the end of a string. But IMO having a “there is no value here” designation is not a bad thing.
by IgorPartola 4mo ago
Is None OK in Python?
NULL in C just doesn’t belong at the end of a string. But IMO having a “there is no value here” designation is not a bad thing.
- none_to_remain 4mo agoI think you're mixing up the NULL pointer and the NULL (sometimes NUL) character.
- jibal 4mo agoPython is interpreted so None is always tested for and will throw an exception if used in the wrong context. This is quite different from a SEGVIO. > But IMO having a “there is no value here” designation is not a bad thing. Sure ... if it's done via the type system so that errors are caught at compile time. There's a reason that modern languages all either do this or are moving towards doing it. (And a reason that C programmers have no idea what we're talking about when we refer to type systems.) > NULL in C just doesn’t belong at the end of a string. Different discussion. (And NUL, not NULL.)