▲ | masklinn a day ago | |
> This contrasts to Go's approach, much like python, of using casing convention to determine private vs public fields. ( Please correct me if I'm wrong on this? ) Go actually ties visibility to casing, instead of using separate annotations. And it will not serialise private fields, only public. Python has no concept of visibility at all, conventionally you should not access attributes prefixed with `_` but it won't stop you. | ||
▲ | maleldil a day ago | parent [-] | |
> conventionally you should not access attributes prefixed with `_` but it won't stop you. Any serious Python project will use at least one linter or typechecker, which can easily enforce this. |