You are viewing a single thread.
View all comments View context
2 points

I wouldn’t say Protocols are more “fragile”… They’re more strict.

permalink
report
parent
reply
1 point

The opposite is true. If you have two interfaces that contain methods with the same name, then they have the same typing.Protocol. It is not possible to specify preconditions or contracts, as you would with abc.

permalink
report
parent
reply

Python

!python@programming.dev

Create post

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events
Past

November 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
  • Pythörhead: a Python library for interacting with Lemmy
  • Plemmy: a Python package for accessing the Lemmy API
  • pylemmy pylemmy enables simple access to Lemmy’s API with Python
  • mastodon.py, a Python wrapper for the Mastodon API
Feeds

Community stats

  • 732

    Monthly active users

  • 469

    Posts

  • 2.4K

    Comments