3 ms·
Why not just use a dictionary, or why not just leave the type unannotated? If you really can't (or don't want to) say anything about the type, then don't. Pytho
by CreRecombinase 4mo ago
Why not just use a dictionary, or why not just leave the type unannotated? If you really can't (or don't want to) say anything about the type, then don't. Python is dynamically typed!
- techn00 4mo agoaverage python script writer
- sdeframond 4mo agoThe point is to mark the constructor as "private" so that it is easy to spot unintended use during code reviews (or using linters).
- MeetingsBrowser 4mo agoThe blog post does want to share some type information with users. They just want to prevent users from relying on a specific implementation of that type. They are basically describing a public API backed by a private type that they can extend, rearrange, or otherwise modify without breaking the public contract.