treyhunner,
@treyhunner@mastodon.social avatar

@ehmatthes this is pretty much the example I give for when I remove that extra variable.

When the function is named "get_something" and the last line is "return something", I'd rather remove the "something" variable when possible.

If the function name isn't the same as the variable name or the variable is assigned somewhere that isn't immediately before the last "return", I'd leave it.

Otherwise, I always remove it.

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