Python staticmethod and classmethod

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ธ.ค. 2024

ความคิดเห็น • 138

  • @QuantumHistorian
    @QuantumHistorian 3 ปีที่แล้ว +121

    One thing that probably ought to have been mentioned alongside class methods are class variables. If you're only accessing class variables with a method, it's probably better to make it a class method. Makes it clear what you're doing and prevents accidentally overwriting class variables with method ones. But class variables aren't all that common to begin with, so this is kind of niche. Still, this is the only major use case outside of alternate constructors (and maybe singlets?) I can think of.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +34

      Yes thanks for pointing this out! In reality I pretty much never see this, but it's good to be prepared!

    • @Friedrich713
      @Friedrich713 3 ปีที่แล้ว +2

      @@mCoding The scenario where I often fall back to using class variables is when I want to bundle some functionality together, but actually never need an instance of the class. Alternatively one could create a module (this would be the functional programming approach), but if the bundle is rather small, it's just a bit less convenient when importing.

    • @DrDeuteron
      @DrDeuteron ปีที่แล้ว

      I use class attributes all the time. Say, I have a constellation of 5 identical satellites, and my class holds their data. I'll handle the data in a base class, and each satellite gets a class color, or matplotlib position, so I can plot data clearly...for every orbit. There are other satellite dependencies that get handled a class attributes, like "bad channels", since thing break in space. Also: launch date, nominal equator crossing time, etc, etc....

  • @ADFsoft
    @ADFsoft 3 ปีที่แล้ว +13

    One reason to use static method is that they are inherited and can be re-defined in sub-classes.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว +3

      That’s true of all methods.
      Oh, you mean in place of top-level functions?

  • @maxskoryk1466
    @maxskoryk1466 3 ปีที่แล้ว +19

    I've been working on a task that has to do with constructing a class instance with additional arguments and couldn't wrap my head around how to do that without breaking the existing API. This video couldn't have come more timely: now that I know that there's such thing as classmethod, I'll explore a bit more about that, and I think this will be handy in solving my problem. THANK YOU for the excellent content!

  • @orisphera
    @orisphera 2 ปีที่แล้ว +5

    For the matrices, I think it's better to do this:
    class Matrix:
    ...
    def can_multiply(self, other):
    ...
    and use a.can_multply(b). This way, you don't have to make a map from classes to functions or use things like type(a).__module__.can_multiply(a, b) to check if you can multiply two variables of unknown type.

    • @PeterZaitcev
      @PeterZaitcev ปีที่แล้ว

      AND you still can call it Matrix.can_multiply(a, b)

  • @pavelkovalenko8845
    @pavelkovalenko8845 3 ปีที่แล้ว +4

    I have been doing python for years now for research projects and uni homeworks. Basically been using with it almost all the time that I worked. I never got to learn these concepts tho despite trying a couple of times - all of the tutorials are either too basic or too specific to follow. This channel really fills that gap with flying colors, and I cannot stress enough how great of a find it is for me. Thanks, keep and up the good work!

  • @RecursiveTriforce
    @RecursiveTriforce 3 ปีที่แล้ว +4

    It's just the arguments that change.
    normal: self, *args
    @classmethod: cls, *args
    @staticmethod: *args
    @property: self

  • @lphillis1
    @lphillis1 3 ปีที่แล้ว +4

    These videos are amazing for intermediate level Python programmers and professional use. Keep making more!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +2

      That's the goal! See you in the next one! (Or maybe in a previous one first?)

  • @Jakub1989YTb
    @Jakub1989YTb 3 ปีที่แล้ว +12

    Becoming a TH-cam Python legend, one video at a time.
    Great work. I'm, so glad I found your channel in it's "early" stage.
    I dig you'r thumbnails too. Simple, but class Y:.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +5

      Glad to have you aboard! I'm amazed you call it the early stage! I remember when I had 30 videos and only 29 subscribers, that was the early stage for me!!

  • @re.liable
    @re.liable 3 ปีที่แล้ว +41

    I was just using staticmethods on my project the other day. I just like having the extra namespace for being more explicit 🙂 Cheers!

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 3 ปีที่แล้ว +17

      Yeah I can tell by your name 😂

  • @ciscoortega9789
    @ciscoortega9789 3 ปีที่แล้ว +16

    What a coincidence, I just learned about staticmethod the other day! Great video, great explanations. Thanks very much.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +3

      Very welcome!

  • @elefantsnablar
    @elefantsnablar 3 ปีที่แล้ว

    2:23 Been searching for a good explanation of why one typically uses classmethod instead of staticmethod for alternative constructors. This explained it perfectly. Thanks!

  • @alexd7466
    @alexd7466 3 ปีที่แล้ว +9

    A good thing to realize is that editors like Pycharm indicate there is something wrong with a method when the method does not use any instance or class variables, and showing the message "could be static". This causes a lot of confusion for beginning programmers who then change all methods to @staticmethods.

    • @HonsHon
      @HonsHon 2 ปีที่แล้ว

      Idk why but I actually like Visual Studio Code better for Python

  • @akshatsrivastavaaa
    @akshatsrivastavaaa 3 ปีที่แล้ว +4

    The black hole joke was funny

  • @nigh_anxiety
    @nigh_anxiety 3 ปีที่แล้ว +4

    It wasn't mentioned, but I think another reason you might call a class method from an instance is if your instance was created from a factory based on an ABC or Protocol, so all of the classes have the same class method with potentially different content.
    Although in that case maybe its still better to have an instance method which wraps the class method.

  • @mattlau04
    @mattlau04 3 ปีที่แล้ว +4

    Really helpful to learn what the use cases might be !

  • @ciberman
    @ciberman 2 ปีที่แล้ว

    I'm a C# developer learning python and I was very confused because there aren't any similar things like class methods in C# or any other mainstream OOP language (Ts, java, etc). So this video helped me a lot. Thank you!

  • @reddragon3132
    @reddragon3132 3 ปีที่แล้ว +1

    A random use case for static methods I found was when parallelising code. If I call an instance method, the whole instance object would be passed to the child process - a massive overhead that caused pretty much negated the parallelisation gains. A static method allowed passing of only the required attributes to process

    • @aflous
      @aflous 3 หลายเดือนก่อน

      Static methods have no access to instance attributes, what are you talking about?

  • @marcgentner1322
    @marcgentner1322 5 หลายเดือนก่อน

    love the full and simple explanaition. i use staticmethods when appling MVC structure to my api's
    from the user_model UserModel class i need only sertain methods from the UserModel class. so i can call whathever query method i need in my controllers.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 2 ปีที่แล้ว

    1:36 In certain countries, the weekend is Thursday and Friday.
    There is at least one country 🇲🇾, where certain states observe this rule, while others observe a Saturday/Sunday weekend.
    Now imagine the fun of different branches of some organization, operating in different states, trying to decide when you can make a call to another branch and expect somebody to answer ...

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      I think that writing a datetime library would probably be the hardest library to write that seems like it would be easy at first glance.

  • @mauriciolomeli2940
    @mauriciolomeli2940 3 ปีที่แล้ว

    The ending brought so much nastalgia (e.g. binding). Thank you!

  • @anthonyrogers9849
    @anthonyrogers9849 3 ปีที่แล้ว +1

    Thanks for this. I have never used static methods myself and have sometimes wondered if I was missing an important use case. Guess not!

  • @Aang139
    @Aang139 2 ปีที่แล้ว

    My main use cases for static methods have been polymorphic work that doesn't need access to the cls or instance beyond variations in the type (rarest case), or serializer classes that use methods to (de)serialize a single field (i don't need the serializer class just the day passed in), or unit test classes

  • @Eclipse_co5mic
    @Eclipse_co5mic ปีที่แล้ว

    this was truly amazing. THANK YOU

  • @vikranttyagiRN
    @vikranttyagiRN 3 ปีที่แล้ว +1

    Thanks for the video. Although I am gonna have to watch it a couple of times to let it all sink in.

  • @CaptainCsaba
    @CaptainCsaba 3 ปีที่แล้ว +3

    So when constructing a pandas DataFrame with the read_excel, read_csv or from_records etc, those are classmethods?

    • @mCoding
      @mCoding  3 ปีที่แล้ว +6

      Actually pandas makes them all freestanding functions. I guess they expect that you don't ever inherit from a DataFrame.

  • @not_vinkami
    @not_vinkami 3 ปีที่แล้ว +5

    1:33 "assuming of course we're ignoring people that live close to black holes."
    Physicists love this assumption

  • @danielderwertvolle6354
    @danielderwertvolle6354 2 ปีที่แล้ว

    0:57 "But sometimes when you write a method you don't really care about the specific instance of a class or maybe you don't have a specific instance yet. That's a good signal that what you are doing is..." applying OOP when you really shouldn't.

    • @mCoding
      @mCoding  2 ปีที่แล้ว +1

      Sometimes, maybe! But let's not confuse using classes with using OOP.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว

      2:16 Should answer your argument.

  • @norude
    @norude 2 ปีที่แล้ว

    2:23 ... and that exactly what happens with any immutable class, that has something like __add__, because you can not make method both *class* and *instance*
    Also you can not inherit from int for same reasons

  • @khalilrouatbi6345
    @khalilrouatbi6345 2 ปีที่แล้ว

    clear and straight to the point!

  • @louca6549
    @louca6549 3 ปีที่แล้ว

    I got asked the difference between the two on an interview question last week!

  • @expirytrader5802
    @expirytrader5802 3 ปีที่แล้ว

    One of the best videos of your I really like it.

  • @AJ-et3vf
    @AJ-et3vf ปีที่แล้ว

    Great video. Thank you

  • @sharkinahat
    @sharkinahat 3 ปีที่แล้ว +3

    Very nice video. I sometimes think staticmethod was added to please programmerd comming from Java.

  • @MrSteini124
    @MrSteini124 3 ปีที่แล้ว

    Great as always, thanks

  • @shashishekhar----
    @shashishekhar---- ปีที่แล้ว

    Thank you for such a helpful video James! , much appreciated brother 👍🏼👏🏽

  • @kevinz1991
    @kevinz1991 3 ปีที่แล้ว

    Really great stuff thank you so much for making this

  • @ThijmenCodes
    @ThijmenCodes 3 ปีที่แล้ว +2

    Great info, thanks. I use static methods all the time, but I never knew that a class method was a thing!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Glad it was helpful!

  • @vekyll
    @vekyll 2 ปีที่แล้ว

    5:50 The fact that you aren't aware of something doesn't mean it doesn't exist. Static methods do have their valid usage, and although rare, it does occur and I've needed it one or two times in my programming career. It happens when you have e.g. a subclass B of class A, and it overrides the method m which doesn't depend on the specific instance--but of course it does depend on the class itself. For example, if you had IslamicCalendar, it would of course redefine what is_weekend means, but it would still be a static method.

    • @mCoding
      @mCoding  2 ปีที่แล้ว +1

      Hi no need for the offensive tone on this channel. Your example is not one I would recommend using a staticmethod for.

    • @vekyll
      @vekyll 2 ปีที่แล้ว

      @@mCoding "When you do use them, the justification for doing so is shaky at best" - do you consider that to be offensive tone?
      Again, telling me you don't like what I told you doesn't solve anything. What _would_ you recommend?

  • @joseville
    @joseville 2 ปีที่แล้ว

    3:43 any thoughts on
    type(self).classattr
    vs
    self.__class__.classattr
    ?

  • @its_code
    @its_code 3 ปีที่แล้ว +2

    WOW 😳 amazing information.
    Love 💕 from Pakistan

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Thanks for watching!

  • @robertbrummayer4908
    @robertbrummayer4908 3 ปีที่แล้ว

    Excellent video

  • @ConsuelaPlaysRS
    @ConsuelaPlaysRS 2 ปีที่แล้ว

    I'd like to see a video about the 'global' and 'nonlocal' statements in python where you detail legitimate cases for when they can sensibly be used

  • @zakyvids6566
    @zakyvids6566 3 ปีที่แล้ว

    Hi James this is a very good channel
    I was wondering can you please make a 30 minute python crashcourse covering the basics of python
    I’m new to coding and wish to watch a short chars course from your channel as it’s very clear and concise simple to follow
    Please consider my request
    Thanks

    • @anthonyaouad4190
      @anthonyaouad4190 3 ปีที่แล้ว +1

      Hey, I suggest watching Corey Schafer he has some good tutorials for beginners. However they are longer than 30 mins!

  • @oddzhang
    @oddzhang 2 ปีที่แล้ว

    5:40 what is "context" exact meaning in Python with the static method

    • @terencetsang9518
      @terencetsang9518 2 ปีที่แล้ว +1

      He just meant the location the function is defined and its surroundings - nothing to do with the Python concept of context (manager).
      On its own the name `can_multiply()` may mean anything, but defining it as either a static method in some `Matrix` class, or a function in some `matrix` module, makes it clear that the function is meant to be used with matrices.

    • @oddzhang
      @oddzhang 2 ปีที่แล้ว

      @@terencetsang9518 Thanks, I supposed to get it.

  • @makhdv
    @makhdv 3 ปีที่แล้ว

    would be nice to mention on typing more. Using mypy can_multiply(a: Matrix, b: Matrix) would have a nice context, imho.
    And is it always factory class methods, returning instance of class to keep inheritance, should become Generic[T] where T Calendar subclass, like ‘def from_json(cls, …) -> ???:’ ?

  • @th_sajal
    @th_sajal 3 ปีที่แล้ว

    Could you comment on what's the size of a class, like an empty class or the one containing some class variables. How does these differ, kind of memory allocation that happens during compilation?

  • @ahasibrifat7568
    @ahasibrifat7568 3 ปีที่แล้ว

    Thanks

  • @aadithyavarma
    @aadithyavarma 3 ปีที่แล้ว

    Amazing video! But why is Sunday given as "U" in your is_weekend() method?

    • @homelikebrick42
      @homelikebrick42 3 ปีที่แล้ว

      because then there would be 2 "S" days?

    • @atrus3823
      @atrus3823 3 ปีที่แล้ว

      @@homelikebrick42 Thursday is also often an R when using single letter abbreviations of weekdays.

  • @hanyanglee9018
    @hanyanglee9018 2 ปีที่แล้ว

    Since python is not static typed, a C.method() is not better than method(). But in static typed lang, such as c++, C.method() is much easier to remember and write, all you need to do is to remember C.me*, write C. and wait for the compiler and find the function start with me. In python, this trick is not stable even if you work with pycharm.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 2 ปีที่แล้ว

    3:09 This can only work in a language where classes are first-class objects!

  • @atrus3823
    @atrus3823 ปีที่แล้ว

    I got a notification of a reply to a comment of mine, but now it seems to be gone. Was it deleted? If so, why?

    • @mCoding
      @mCoding  ปีที่แล้ว

      Wasn't me, probably yt auto spam filter.

    • @atrus3823
      @atrus3823 ปีที่แล้ว

      @@mCoding oh well! Stuff happens 🤷

  • @MultiCraftTube
    @MultiCraftTube 3 ปีที่แล้ว

    I really enjoy learning new stuff in Python on this channel, but I wonder how usefull all of this is. Are there any enterprises operating on Python? :D

  • @aonodensetsu
    @aonodensetsu 2 ปีที่แล้ว +2

    static methods are great, you can import the class and then know that Matrix.can_multiply is a function from the matrix file, instead of importing * and having a random can_multiply function in your namespace

    • @vekyll
      @vekyll 2 ปีที่แล้ว

      Static methods really are great, but 1) you're mixing classes and files, this is not Java where they are the same, 2) can_multiply is in fact an ordinary method, since a (and also b) is a Matrix. So yes, it is a good example of a method, but not of a static method.

  • @nurkleblurker2482
    @nurkleblurker2482 2 ปีที่แล้ว

    But wouldn't the class always be the same because the method is defined in a class? If cls is identical to type(self) then how is a class method useful?

  • @kyle-silver
    @kyle-silver 3 ปีที่แล้ว +1

    Sometimes I use static methods for “private” class methods. If there’s some function specific to the class that happens to be static but I don’t want to expose as part of the public api, I think it’s a good way to signal “this functionality shouldn’t be used elsewhere”

    • @aadithyavarma
      @aadithyavarma 3 ปีที่แล้ว +1

      In python, one way to hint that a method is "private" is by using a single underscore.
      def _private_foo(self):
      pass
      The notion is that, this method should not be used outside the class it is defined.

    • @atrus3823
      @atrus3823 3 ปีที่แล้ว

      I think get what you're saying, but I don't think "private" is the correct term. And by public API, I assume you mean the module API? Static methods still exist in the class' public API. Like, if it was a module function, it implies that it can be used in any case where it applies, but if it is static, it implies that it should only be used with that class?

    • @aadithyavarma
      @aadithyavarma 3 ปีที่แล้ว

      @@atrus3823 When you make a method, a staticmethod, it means that the method will not be using any other variables or methods of the class it is in, but still makes sense to be inside the class due to the staticmethod doing something related to what the class is supposed to do.
      You can call the staticmethod with the class or the object of the class, outside the class and it still is valid and makes sense.
      If you want to make the method seem "private" meaning it does not make sense to use it outside the class, then adding a single "_" at the beginning of the method is the pythonic way to do it.
      In short, static and private are two independent features imo.

    • @atrus3823
      @atrus3823 3 ปีที่แล้ว

      @@aadithyavarma Why are replying this to me? Did you mean to reply to the original post?

    • @bartomiej368
      @bartomiej368 3 ปีที่แล้ว

      @@aadithyavarma i think he meant that (what i also do) that there are "helper" methods that are both private and static, when you need apply set of instructions on data, like formating, but don't want to write it several times.

  • @trag1czny
    @trag1czny 3 ปีที่แล้ว +5

    discord gang 🤙🤙

    • @Sonyim414
      @Sonyim414 3 ปีที่แล้ว +2

      More like opened my TH-cam now gang

    • @p_square
      @p_square 3 ปีที่แล้ว

      🤝

  • @DrDeuteron
    @DrDeuteron ปีที่แล้ว

    definitely use class methods as constructor helpers: do not do work in dunder init! It should just initialize instance attributes.

  • @zbaktube
    @zbaktube ปีที่แล้ว

    at line 12, why Sunday is encoded as 'U'?

    • @mCoding
      @mCoding  ปีที่แล้ว

      Because sunday and saturday both start with S, it is common to represent sunday with U.

    • @zbaktube
      @zbaktube ปีที่แล้ว

      ​@@mCoding I see, and 'T' 's are OK as they are not next to each other, aren't they?

    • @zbaktube
      @zbaktube ปีที่แล้ว

      ​@@mCoding By the way, thanks, I did not know that

  • @therandomsomeone.
    @therandomsomeone. 3 ปีที่แล้ว

    this channel has only one purpose
    it is to make overviews of python decorators

  • @masheroz
    @masheroz 3 ปีที่แล้ว

    Would class methods cease to be a thing if there were the possibility of multiple constructors?

    • @alexd7466
      @alexd7466 3 ปีที่แล้ว

      creating alternative constructors is precisely why classmethods exists.

    • @masheroz
      @masheroz 3 ปีที่แล้ว

      @@alexd7466 then why not just have multiple constructors?

    • @alexd7466
      @alexd7466 3 ปีที่แล้ว +1

      @@masheroz We have 3 ways to create alternative constructors already, and you still need more?

  • @MithicSpirit
    @MithicSpirit 3 ปีที่แล้ว +2

    Discord gang

  • @joeyv8197
    @joeyv8197 9 หลายเดือนก่อน

    Im in the middle of a python course and have been watching plenty of videos and a show about programming, how long did anyone else take to catch on?

    • @mCoding
      @mCoding  9 หลายเดือนก่อน +1

      Keep at it! It can take years to see the importance of some of my videos, don't let them drag you down. Just keep coding and build stuff that interests you. The stuff that matters will become apparent through experience over time.

    • @joeyv8197
      @joeyv8197 9 หลายเดือนก่อน

      @@mCoding I'm def not expecting to get a job anytime soon but I have learned a lot and only a 3rd of the way through the course!

  • @pavelx6411
    @pavelx6411 3 ปีที่แล้ว

    Discord!!!!

  • @sdprogrammers
    @sdprogrammers 3 ปีที่แล้ว

    Static variable

  • @26-dimesional_Cube
    @26-dimesional_Cube 3 ปีที่แล้ว

    A hacker give this code to you
    def password(str_input, str_key): -> int
    Password_num = 0
    str_key_len=len(str_key)
    str_input_len=len(str_input)
    for i in range(str_input_len):
    Password_num += str_key.index(str_input[i])*str_key_len**(str_input_len-i-1)
    return Password_num
    This function can take a string and output the password needed to protect the string
    Puzzle: Make a inverted function where argument are password and str_key
    Input:
    Line 1: password
    Line 2: str_key
    Output: A string
    Constrains: str_key cannot have duplicate letter and must have at least character within the str_input

  • @tytywuu
    @tytywuu 3 ปีที่แล้ว

    assume that they do not live near black holes.
    very important assumption indeed

  • @friedkeenan
    @friedkeenan 3 ปีที่แล้ว

    For implementing classmrthod, you can also just call the constructor of types.MethodType which I find to be cleaner and more readable than calling `__get__` on the underlying function

  • @itsmanikandanraju
    @itsmanikandanraju 3 ปีที่แล้ว

    Hi James, Good day to you.. I have been following your channel for quite some time. It was very helpful to understand unfamiliar python concepts. Could you pls make a video on UDP/TCP packets logging and manipulation with python. Love from India

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Suggestion noted! Though if i were to cover tcp or udp it would probably be a C or C++ video as python would struggle with such primitives.

  • @cristobaljvp
    @cristobaljvp 3 ปีที่แล้ว

    Lately I've been reading big libraries and classmethods are used a lot. I actually haven't need them until now, but I hope I can get the opportunity to use them.
    Good video as always. Thanks for the content!

  • @codingcrashkurse6429
    @codingcrashkurse6429 3 ปีที่แล้ว

    I always learned: If you think about using a static method, you probably don´t want that method in your class. Can anyone proofe me wrong here?

    • @sadhlife
      @sadhlife 3 ปีที่แล้ว +2

      He explained it in the video with the "is_weekend" function.
      Staticmethods can be useful to provide context to the programmer that the function belongs to a class. Even if it doesn't need to be in it.

    • @QuantumHistorian
      @QuantumHistorian 3 ปีที่แล้ว +9

      I just like having things in a namespace. I also use it if the function is exclusively called by methods of a particular class. It's then a sign that says "You're not going to need this elsewhere, don't worry about it". Because when I read a module, I tend to read more carefully the standalone functions as things that I might want to call from outside the module. Burying something as an static method avoids that, and can mean that a method is defined close to where it's called, which further improves readability.
      But yes, it's a minor stylistic thing, and it can "softlock" future widening of scope.

  • @oamioxmocliox8082
    @oamioxmocliox8082 3 ปีที่แล้ว

    ;)

  • @markcuello5
    @markcuello5 2 ปีที่แล้ว

    HELP

  • @SachinShukla230187
    @SachinShukla230187 9 หลายเดือนก่อน

    Confusing......

  • @benvan3721
    @benvan3721 5 หลายเดือนก่อน

    thanks. but not right for a beginner learner. It's like reading a file

  • @jonobrien8848
    @jonobrien8848 ปีที่แล้ว

    static methods should just not be in the class since they don't use self.

  • @adityahpatel
    @adityahpatel 7 หลายเดือนก่อน

    this is not a good example to illustrate of. Confuses more than simplifies

  • @obed818
    @obed818 2 ปีที่แล้ว

    Dont you want learn french language my friend ?

    • @obed818
      @obed818 2 ปีที่แล้ว

      😣

  • @IndellableHatesHandles
    @IndellableHatesHandles 3 ปีที่แล้ว +1

    Jeez, Python is becoming a patchwork. I find Java annotation-like syntax like this to be ugly. It doesn't fit Python at all.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 2 ปีที่แล้ว

      Decorators are not “annotations”. They are actual function calls.

  • @Nieosoba
    @Nieosoba ปีที่แล้ว

    eee sorry but not very good explanation, but thanks anyway

    • @mCoding
      @mCoding  ปีที่แล้ว

      Hello fellow person with an m avatar 👀. Perhaps you would enjoy my video on descriptors instead?

  • @squeezyfranky620
    @squeezyfranky620 2 ปีที่แล้ว

    Why are you using pseudocode for teaching?
    In my opinion this video needs executing and real code. it's not that hard. For me as a beginner it took а few hours to uderstand what's realy going on with my own code.
    Please, add some more executing. It will make content so much easier to understand

  • @dDANiLiCHh
    @dDANiLiCHh ปีที่แล้ว

    boring.

    • @mCoding
      @mCoding  ปีที่แล้ว

      lol i don't disagree

  • @dhuhacorp9372
    @dhuhacorp9372 ปีที่แล้ว

    Your explanation is jumping everywhere and make me confuse

  • @random_color_lemon
    @random_color_lemon 3 หลายเดือนก่อน

    Thanks

  • @markcuello5
    @markcuello5 2 ปีที่แล้ว

    HELP