fohrloop,
@fohrloop@fosstodon.org avatar

@driscollis yet another thing in the #python standard library I've never seen or used. I wonder when one would use the functools.singledispatch over a set of if isinstance(..) elif isinstance(..)? The singledispatch feels like a bit of magic since going to the definition of the function does not show what it does and one has to go to Ctrl-F for all the @func.register's to find the implementation 🤔

#functools #pythonstandardlibrary

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • DreamBathrooms
  • mdbf
  • tacticalgear
  • magazineikmin
  • thenastyranch
  • rosin
  • everett
  • Youngstown
  • khanakhh
  • slotface
  • ngwrru68w68
  • kavyap
  • cisconetworking
  • InstantRegret
  • JUstTest
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • tester
  • Durango
  • normalnudes
  • provamag3
  • modclub
  • cubers
  • Leos
  • megavids
  • anitta
  • lostlight
  • All magazines