python descriptors! (advanced) anthony explains

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • today I to into detail about data descriptors, non-data descriptors, what the point of them is, as well as a quick example!
    playlist: • anthony explains
    ==========
    twitch: / anthonywritescode
    dicsord: / discord
    twitter: / codewithanthony
    github: github.com/aso...
    stream github: github.com/ant...
    I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!

КОМЕНТАРІ • 26

  • @a-rye
    @a-rye Рік тому +11

    You weren't kidding about advanced, but I enjoyed it all the same. Keep up the great work and awesome videos, sir!

  • @amir.hessam
    @amir.hessam Рік тому +10

    nice! I was waiting for this for a long time ... maybe next is MetaClasses ?

  • @muradpopattia5556
    @muradpopattia5556 Рік тому +1

    At 14:00, inside get(self, obj, owner), shouldn't it be if obj is None: return self instead of checking owner to be None, since when called from class, the instance would be None and not the owner. Do correct me if I'm wrong. Nonetheless, enjoying your vids. Hope to get a mentor like you one day!

    • @aflous
      @aflous Місяць тому

      You're right!

  • @sanithumabarna
    @sanithumabarna Рік тому +1

    Can you give long explanation about MetaClasses in python ?

  • @BinaryLynx
    @BinaryLynx Рік тому

    Purpose is to make ... magical and different. Informative

  • @luabida
    @luabida Рік тому

    lol I can't see one of your videos and don't click in it. I'm addicted

  • @MatiasRondeau
    @MatiasRondeau Рік тому

    Thanks Anthony! It's very helpfull the video! Just a question. What about async descriptors? It's possible to apply?

  • @elenaromanova2841
    @elenaromanova2841 Рік тому

    Thank you for video. Would you talk about Hypothesis module in python or PoolManager. I got project from third party where this modules used. Trying to understand how I can utilize it best. Would be cool to hear your input.

  • @ВалерийГазаров-я5г

    Nice video. Sorry for offtopic question, but what keyboard is that? Look so cool!

    • @anthonywritescode
      @anthonywritescode  Рік тому

      check out the faq playlist! It's the kinesis something or another

  • @senseikoudai6186
    @senseikoudai6186 Рік тому

    I've recently watched a video about getter, setter and deleter decorators in combination with the @property decorator.
    Do these decorators basically add the same functionality you showed?

    • @anthonywritescode
      @anthonywritescode  Рік тому +1

      if you search my channel I've got a video on exactly how the `property` descriptor is implemented

  • @DanHartwigMusic
    @DanHartwigMusic Рік тому

    100th like.
    Hope you get 1_000_000

  • @rdean150
    @rdean150 Рік тому

    Can you make a video discussing class properties, why chaining @property and @classmethod decorators does not work properly, and how to implement a combined classproperty decorator descriptor?

    • @anthonywritescode
      @anthonywritescode  Рік тому

      there's a few videos where I tear down property in depth -- they're near the beginning of the playlist (try the github link might be easier to find them)

    • @rdean150
      @rdean150 Рік тому

      @@anthonywritescode Sorry, I mean *class-level properties* specifically. There are nuances to the @property and @classmethod decorators that make them un-chainable, apparently. Or at least, chaining them together is not always safe.
      Or are you saying that this topic in particular is covered in your previous videos on properties?

  • @blendrugova2426
    @blendrugova2426 Рік тому

    What editor is that?

  • @ahjsbkdjhavkcjhvac
    @ahjsbkdjhavkcjhvac Рік тому

    very nice, could you share the code in a gist?

    • @anthonywritescode
      @anthonywritescode  Рік тому +2

      it'll eventually show up on github.com/anthonywritescode/explains

  • @gonubada
    @gonubada Рік тому +2

    Descriptors are cool 😎

    • @茱莉-x2o
      @茱莉-x2o Рік тому +1

      Hi I'm new to Descriptors and I learned online. Can you help me understand the use case of descriptors? my background is data science. thanks a lot in advance.

  • @expirytrader5802
    @expirytrader5802 Рік тому +1

    Much awaited video from you. Thanks adding this one

  • @ChristianBrugger
    @ChristianBrugger Рік тому

    Great video! Thank you.