Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Sergi
Sergi
@sergi@floss.social  ·  activity timestamp 5 months ago

When using Protocol on Python, do you subclass from it?

Do you decorate the Protocol methods with abstractmethod?

I've seen different implementations for the questions above, and they all work, and I'm not sure of the benefits of doing it one way or another.

#Python #protocol #typing

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.40 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct