@treyhunner@mastodon.social
@treyhunner@mastodon.social avatar

treyhunner

@treyhunner@mastodon.social

#Python & #Django educator & team trainer

I help folks sharpen their Python skills with https://PythonMorsels.com🐍🍪

#pythonoddity

Also a #humanist #YIMBY who is attempting more ethical eating (#vegetarian, not yet #vegan) and thinks #economics is highly underrated, but I don't post about those topics very often.

he/him

This profile is from a federated server and may be incomplete. Browse more on the original instance.

treyhunner, to python
@treyhunner@mastodon.social avatar

I made a decorator that immediately calls the function it decorates within a loop.

I do not regret my decision.

https://treyhunner.com/2024/06/a-beautiful-python-monstrosity/

treyhunner,
@treyhunner@mastodon.social avatar

@glyph Did you write a post on this at some point?

I could have sworn I'd seen someone else demonstrating a similar legitimate-but-weird use of a decorator that performed actions at decoration time.

treyhunner, to python
@treyhunner@mastodon.social avatar

Well, if you're trying to delete a block of code but you don't want to lose it, and you're using Git (or a similar version control system) I would commit that code to Git and then delete it.

Read more 👉 https://trey.io/a5O8qe

#Python

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