Posts

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

chrisyxlee, to plant_milk
@chrisyxlee@hachyderm.io avatar
skinnylatte,
@skinnylatte@hachyderm.io avatar

@chrisyxlee put a wooden sooon across it!

chrisyxlee,
@chrisyxlee@hachyderm.io avatar

@skinnylatte 🤦‍♀️ I had a wooden spoon in it for stirring and then washed it way too early without thinking

chrisyxlee, to python
@chrisyxlee@hachyderm.io avatar

TIL in my adventures, the proper way to set up a class that returns itself is to use the Self typing annotation and return values by calling self.__class__ on the new value

from typing import Self  
class ImActuallyAString(str):  
 def one_longer(self) -> Self:  
 return self.__class__(self + "one")  

ᕕ( ᐛ )ᕗ (please tell me if I'm wrong lol)

treyhunner,
@treyhunner@mastodon.social avatar

@chrisyxlee I always forget about typing.Self 👏

I'd call type(self)(...) on the new item. I prefer to avoid dunder attributes when there's a higher-level way to access the same thing.

This is not a universally agreed upon convention though, as there are parts of CPython's source code that use self.class and parts that use type(self). Most of the self.class parts are older and may have predated type(...) being usable (old-style classes didn't work well with type back in Python 2).

chrisyxlee, to VideoGames
@chrisyxlee@hachyderm.io avatar

do i truly enjoy playing ? or is my coping mechanism for stress?

the answer is yes

chrisyxlee, to random
@chrisyxlee@hachyderm.io avatar

Great job on the SLOconf talk @hazelweakly!! ❤️
I'm still impressed you did calculus to explain SLOs 👏

https://www.youtube.com/watch?v=fGSDTKYQx1I

hazelweakly,
@hazelweakly@hachyderm.io avatar

@chrisyxlee thank you! It was a lot of fun! I'm looking forward to putting even more math into a blog post related to this :)

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