| Post Reply | RetroFed Forum Forum Index » Python |
| Author | Message | ||
|---|---|---|---|
Rimu
piefed.social
rimu@piefed.socialJoined: 2024-01-04 |
Protocols have something to do with typing. With protocols, you can check whether an object is valid based on whether it has the right methods and attributes. The idea is to check for behaviour instead of inheritance. Protocols extend Python's type hints by allowing to define structural types. |
||
| 2 Original | |||
| Post Reply |
Back to top |