3 ms·
still, that's all hints. What the argument/attribute gonna be at runtime, is .. a guess (maybe with 99% probability what is expected but may also be not). So on
by svilen_dobrev 3y ago
still, that's all hints. What the argument/attribute gonna be at runtime, is .. a guess (maybe with 99% probability what is expected but may also be not). So one gets a hint (in syntax instead of comment saying so) plus a false feeling of assurance of something.
i have no problem with the notion of variable anotations, it is wildly useful for many things.. but sparingly.. and not for "static typing" illusion.
Python does have real strong types (so you cannot easily replace the type of some object with some other type without anyone noticing, ala (int)(void)(char)x stuff.. but that's nothing to do with this.
>> Function signatures become horrendous lists of xxx:yyy->zzz
as example that i recently stumbled upon - fastapi, and few others in its vicinity. Seems IDE-fancy-ability trumps common sense. But anyway.