Dynamic Attribute Handling in Python: getattr(), setattr(), hasattr(), delattr()

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 18

  • @bedtime_RL
    @bedtime_RL Год назад +7

    Just to add to the content, getattr can also work with methods inside class. Let’s say you got a Bot class with a method named display, you can use getattr(Bot(), “display”)() to dynamically call the methods.

  • @MaxShapira2real
    @MaxShapira2real 6 месяцев назад

    Clear and to the point. Awesome stuff! 🚀

  • @gamerk88
    @gamerk88 4 месяца назад

    Is'nt the comments for this video are less MAN I mean he explained everything so nicely..

  • @mmurray4043
    @mmurray4043 Год назад +5

    NeuralNine should be renamed NeuralTenOutOfTen. Thank you for this great video

  • @teprox7690
    @teprox7690 Год назад

    sehr schöner Content!

  • @scarysticks66
    @scarysticks66 Год назад +1

    Neuralnine have you tried Mojo?

  • @dipeshsamrawat7957
    @dipeshsamrawat7957 6 месяцев назад

    Thank you ❤

  • @paulthomas1052
    @paulthomas1052 Год назад

    Thanks very useful.

  • @SolidBuildersInc
    @SolidBuildersInc Год назад +1

    This was a jewel. I am more comfortable with Functional Programming with Pandas. Trying to have a RAD flow with OOP has been very challenging for me. This was the missing link. How or Can the OOP be a dataset to sync with a DB?
    I never understood how the OOP Devs managed the data efficiently. To me, it seems like if the server goes down they lose all of the data because it wasn't a DB. Maybe it was a DB, but this is my delima.
    Anyway,
    Thanks for sharing 🎉

  • @youssefalkhodary
    @youssefalkhodary Год назад

    Perfect

  • @vishnubalaji9500
    @vishnubalaji9500 Год назад

    guys you can also use self.__dict__['key'] to add , change , remove or find if class attributes exists. It works similar to globals() and returns a dictionary of class attributes.

  • @ruzibayevich1693
    @ruzibayevich1693 Год назад

    I wanna cry, why my tech hasn't taught that 😢

  • @A.A.Selwy-77
    @A.A.Selwy-77 Год назад

    interesting .

  • @kutilkol
    @kutilkol 8 месяцев назад

    Your head morphed into gta san andreas character

  • @ShafiUchiha8
    @ShafiUchiha8 Год назад

    Bro I want to learn subprocess

  • @tcgvsocg1458
    @tcgvsocg1458 Год назад

    its good video please don t show your face

    • @tr5946
      @tr5946 8 месяцев назад +1

      Wrong

  • @ahmehhhd
    @ahmehhhd Год назад

    man your voice tone has changed a bit. you okay?