Discussion
Loading...

Post

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

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
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.2.6 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct