Python Decorators: The Complete Guide

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

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

  • @timlind3129
    @timlind3129 Год назад +181

    The way you progressively take the viewer through the level of abstraction is one of the best parts of this, and many of your videos.

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

      Yep, exactly!

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

      Agreed. While I really enjoy James Powell videos like the one below, @ArjanCodes just presents things in a very fluid manner.
      ruclips.net/video/cKPlPJyQrt4/видео.html
      My colleagues were lost with the content presented in that James Powell video. But I hope that no one was lost with what @ArjanCodes presented in this one.
      Good job @ArjanCodes! Thank you.

    • @bmccollum
      @bmccollum 5 дней назад

      200% agree!

  • @demolazer
    @demolazer Год назад +37

    I've consumed a lot of programming content recently and this channel is one of the best I've seen. Well produced, professional and perfect pacing. Even the occasional joke!

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

    This is just gold on youtube. So many junior devs don't understand decorators in Python, and think of them only as this "Magic" that you put on top without understanding anything. Thank you, Arjan.

  • @petrnovota8238
    @petrnovota8238 Год назад +30

    Great stuff. I have never understood decorators... Until now. It was so nice how you showed step by step how it works. I thought decorators were only python thing but now I see its a general concept doable in all languages

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

      Glad you liked it!!

    • @MJ-xl5jz
      @MJ-xl5jz Год назад

      ​"@ArjanCodes"
      It even works on RUclips. I'm just trying to wrap Arjan's Glad-you-liked-it to decorate my comment.

  • @m_7_1_45
    @m_7_1_45 Год назад +68

    Hi, Arjan! Can you make a video about "module/package structure" in Python? For instance, using a project as an example, what classes should be grouped together in which modules/packages (nomenclature, subjects, etc). Regards!

    • @ErikS-
      @ErikS- Год назад +3

      I totally support this idea!
      For me it is still a bit of a mystery how to BEST create a library/package from your own files...

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

      ^

    • @Fritz0id
      @Fritz0id Год назад +3

      Yes x1000. While the syntax isn’t too hard to get my head around, best practices is always difficult to get a handle on. And most info on web is for open source projects. It’s actually quite difficult to get an idea of how to robustly share internal packages with the rest of your team in a non-open way.

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

      +999 to this :)

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

      agreed. i'd like to see that too

  • @byryepez
    @byryepez Год назад +20

    ".. a pain in the class.." 🤣 Added to my sayings... Thanks Arjan!

  • @pavfrang
    @pavfrang 6 месяцев назад +2

    I cannot overstate how well you described the decorators in every aspect! Great work!

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

      Thank you so much!

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

      Thank you so much!

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

    I came for the high quality and well thought out content. I stayed for it too. But I loved it for all of the glorious puns. :D Thank you for the education and the puns. Both are much appreciated!

  • @timelschner8451
    @timelschner8451 Год назад +8

    One of the best channel for learning python best practices. Thanks alot Arjan!

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

      Thank you, Tim, glad you find the content helpful!

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

    This dude i can tell came from Java/C++ world he mastered OOP - this is a great for a seasoned developer. Thanks bro.

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

    My python code always looks like it's straight out of the 90s and yours reminds me of something from another time completely. Definitely should brush up more :)

  • @robbybobbyhobbies
    @robbybobbyhobbies Год назад +3

    Turtles all the way down. Glad you mentioned the "harder to read" downside. Excellent presentation of a fun tool.

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

      Thank you, glad you enjoyed it!

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

    Danke!

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

      Happy you enjoyed the video, Andreas!

  • @CNich90
    @CNich90 3 месяца назад

    Excellent presentation! I think I need to watch this two or three times to fully understand as this is a lot like the movie Inception, dreams within dreams… Thanks for putting the time into this content and also for the additional discussion at the end where you discussed practical use. Cheers!

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

    Tak!

    • @ArjanCodes
      @ArjanCodes  11 месяцев назад +1

      Thank you for your support, Cassidy!

  • @АлексейСолнцев-п1ъ

    Omg, thought how to combine music with your videos - and here it comes. Much easier to switch from coding to learning now, nice feature:)

  • @ashishthanki4568
    @ashishthanki4568 Год назад +2

    It's literally like you're spying on my current challenges at work! There's a heavily nested decorators function that is being used and this has cleared things up a lot! Thanks so much, keep going with the great work!

  • @banatibor83
    @banatibor83 Год назад +6

    I know the decorator pattern from top of my head, but I use python decorators so rarely I have to re-learn them every time :)
    Another good use case for decorators is error handling. We catch different exceptions in a web app on different layers and turn them into http errors.
    But overall decorators are a niche thing.

  • @Melindrea
    @Melindrea Год назад +3

    Welp. I guess I now know exactly what I need to rewrite part of a work project. There's some complicated and annoying interdependencies that I am not a fan of, but I hadn't figured out how to solve it.
    Also, thanks for explaining something that as far as I could tell were just magic!

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 Год назад +2

    22:38 You shouldn’t have bothered with functools.partial. Just do
    with_default_logging = with_logging(logger)

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

    This is the most practical advise on decorators i've ever seen or heard.

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

    This channel has the most useful python tutorials.

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

    Easily the best presentation on decorators I’ve ever seen. 👏🏻

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

    I started watching recently and I have been pleasantly surprised by the quality of your content. There is one caveat, I think, to using the @decorator syntax of python and that is if you need to provide different parameters to the wraper function in different moments. Since the decorator is set at the beginning of the definition of a function, you would either define a function multiple times with the decorator with updated parameters, or use one of the other ways to use a decorator as you showed in the video.

  • @coppolos
    @coppolos Год назад +2

    JIC: we also can implement decorators using class with `__init__` and `__call__` method (`__init__` for parameterizing and `__call__` for applying deco to func of class)
    And in addition we can decorate not only functions but classes as well

  • @AndreasHejndorf
    @AndreasHejndorf Год назад +3

    I definitely agree that wrapping logic in decorators makes code harder to read, but I love using them to register handlers, like how Flask defines routes.
    I use it like that all the time for event handlers, and I just think it makes the code super easy to read and understand.
    Love your videos, so happy to see someone else who loves Python as much as I do 😁

    • @sadhlife
      @sadhlife Год назад +2

      BTW, flask's decorator functions also return the original function unchanged. So even though a function is a flask route, you can call it just like a regular function if needed.
      Flask's types were broken regarding this fact, and I had to fix them sometime last year.

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

    I have watched a few videos on this topic and you explained the best. It's so easy to understand with some background (classic decorator pattern in OOP and then how Python gets it done). Thank you.

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

    This is the one of the most interesting and enlightening video within your playlist.
    I am about to flex all these skills from your video into my code-base. 🤣

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

      Go for it! 💪🏻

  • @TimLauridsen
    @TimLauridsen Год назад +2

    Great video, I use decorators all the time, but only the cases as you show in the video benchmarking and logging start of end of a method call.
    Never use multiple decorators, if i need both timing and logging, i create a single decorator that does both

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

      this is not always the case. there are quite well known frameworks which use stacked decorators frequently as middleware.

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

      also order matters. if you have a number of decorators, do you want to write a decorator for every combination of them?

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

    Realized now that Arjan codes is one of the only channels that when you ask for a like i actually stop and like the video. Thought goes like: "that's so useful, it really deserves a like" hehe
    btw: i would like to see your deep dive on the import system ...

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

      Thanks for your support! I noted your suggestion :)

  • @jimmyf.x.9526
    @jimmyf.x.9526 Год назад

    I liked the first part of your tutorial. It reminded me how I used to decorator before java 1.5, and instantly boosted my learning speed.

  • @apmcd47
    @apmcd47 3 месяца назад

    You asked if anyone was using their own decorators, so here goes. We're developing a Flask application with authentication, of course. We are using the Flask-provided login_required decorator but also require different roles for the users. This meant testing whether the user had the appropriate role at the beginning of certain routes. I decided this was essentially code duplication and really required a new decorator in which you supply a list of roles. Surprisingly easy to write, really. It's part of the code base and documented, so a future developer of the application should understand how and when to use it.

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

    Great video. For anyone wanting to use the with_default_logging decorator, be aware of a potential issue. Most likely, the logger object will have the name from the module where it was instantiated. If you import it via decorator into another module, it might get confusing where the logging call actually came from because the logger name can be mistaken for the module name. I definitely had the issue in the past and it took me a while to figure out what was going on.

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

    I just started getting into decorators, and this is such a comprehensive guide on what the hell a decorator is, thank you so much

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

    Finally understand how decorators work in detail

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

    Just way awesome than any video. Thank you loads Arjan ❤

  • @nayelnoorani
    @nayelnoorani 9 месяцев назад

    Thanks for the excellent and easy-to-follow explanation! Brilliant teaching :)

    • @ArjanCodes
      @ArjanCodes  9 месяцев назад

      I'm glad to hear that the video was helpful :)

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

    I was trying to accomplish a decorator in a class and couldn't make any sense of it until i saw this video.
    Arjan explains the best and most generic way of achieving a decorator.

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

    Liked the video when I saw the like video button light up as soon as you talked about it. Nice!

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

    Decorators are truly a double edged sword. I have used them in the past to pass on a database session through multiple layers of controllers in a rest application. The decorator took ownership of the session and decided when to open / flush / commit / and close the session. It also added some parameters to every controller function in order to implement some security features. It worked wonders for our project as even after countless controller calls a session could seamlessly revert to an old state if an error occurred and controller functions were automatically secured, but to this day it confuses some developers when working with it, because not everyone understands python decorators well. Though I still stand to that design choice today.

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

    Really nice video! I discovered Decorators in my new job (C++), but we use the traditional pattern because we can change the order and list of them by the DI configuration tool or inside factories. Amazing how things like anticipation, sync or cached operations are decoupled from the model object.

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

    I wrote a decorator for a web application once that enforced authorization. It would get the user session object from the coroutine context and verify that the user possessed the permissions defined in the decorator call. e.g. @secure('write_permission')
    Great videos btw! I would appreciate a video on decorator classes. I've always found them very hard to understand how they work and what the pros/cons are. Oh, and a video on the coroutine context! Thanks!

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

    One of your best videos yet

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

    Thanks. It is a great video explaining how decorator works. It is a good feature of dynamic programming language.

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

      Thank you for the kind words! Glad you liked the video.

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

    Thanks, i like the path from classic patter to python’s decorator style.

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

      Glad you like it!

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

    THANK YOU 😊 Wanted something on this topic and just in time for lunch break today ! Gonna use it immediately

  • @mzahran001
    @mzahran001 Год назад +2

    Thank you so much for the videos!
    Could you use more visuals (drawings) before writing the code? I guess if you draw what you are trying to build before building it, this will deliver the message perfectly

  • @guilhem2870
    @guilhem2870 11 месяцев назад

    cette chaine est une mine d'or ! 🧡

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

    As a functional programmer I love the functional decorator, combinators are good.

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

    Huge pain in the 'class' haha! Very nice!

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

    For me the option that makes most sense is to use functions in the decorator design pattern. That way, if you're benchmarking code (say, in a jupyter environment) you can called the decorated functions of methods, but when you're deploying the code in a script that needs to run for hours and no one will look at, you can call the function without the decorator, thus leaving out a bunch of logging and calls to perf_time()

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

    This is extremely interesting, I am working on a Flask 2.0 project and would like to know if you have any videos on Flask. Search did not find anything apart from GarphQL VS Rest. Thank you.

    • @ArjanCodes
      @ArjanCodes  Год назад +2

      Haven't done a video on Flask, but soon a video will come out on FastAPI.

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

      @@ArjanCodes I look forward to it, thank you very much.

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

    One of the best python video makers ever.. Keep going sir.. 😁 I have been following since so long, I'm a machine learning engineer and I come here once in a while, and always watch the latest ones to be sure my python skills are state of the art 😎

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

      Thank you so much for your support!

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

    Thanks for the lesson Arjan. Very well done.

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

    I use decorators mostly for testing and debugging. Having a dedicated decorators for benchmark and logging produces less clutter and I can simply remove the decorator if I no longer need it. I also use my own @NOT_IMPLEMENTED decorator to automatically raise a NotImplemented exception and print message to the console, so I don't have to write the code manually in every function over and over.
    Otherwise I try to stay away from decorators (unless it's property, dataclass or pytest fixture).

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

    In my previous work, VW group, decorators were used to decorate classes and decorators created instances of classes that we wanted to use in the class. So they were some kind of Factories for other classes. I had no idea how that worked at the time :)

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

    Great Video Arjan. How would you implement an async decorator for async functions or a decorator that can be used on both sync and async. Still found a solution that "feels" right

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

    Exactly the video I was looking for. 🎉🎉

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

    Easy to follow and very helpfull!

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

    Python 3.12 threw
    TypeError: 'float' object cannot be interpreted as an integer
    using the sqrt inside of range - needed to change to
    for element in range(2, int(sqrt(number) + 1)):

  • @YaroslavOliinyk2023
    @YaroslavOliinyk2023 Год назад +6

    Thank you so much for your hard work and the effort you put into your channel. Great video!!!
    Quick question/ idea for another video
    Could you describe the difference between Decorator and Proxy Design patterns?
    Thanks in advance!

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

    I recently implemented a version elevator system using decorators. The version elevators were just simple functions that take in a config object and modify it in-place updating it to the next highest version. The decorators were needed because some versions needed multiple mending functions due to inconsistend versioning plus we also had some functions that were just there to provide some convenience options in the configs. As such, the decorator would take the version for which the mending function should be applied as an argument or None it is a convenience thing. The decorator would then take care of adding logging and registering the mending function. Now, outdated configs can be updated by just running all the version escalators on it in the given order, e.g. if the config is version 3 and the current version is 5 it would be 3->4->5 and then run all of the convenience stuff. I think the decorators make the code quite tidy since all you see is really only the migration logic. I would recommend using the class-based approach with `__call__` when you want decorators that take arguments though. I find them easier to read than three nested functions and it makes dealing with defaults easier as well.

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

    Brilliant video. May I ask which IDE is that - that run button and auto switching to terminal is quite nifty.

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

    Amazing content! Thanks so much for sharing that.

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

    Simply an amazing video 😌 Thank you.

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

    One notable case where I built my own decorators was to build a mini-ETL framework. I was using decorators to inject data validation checks pre and post transformation steps.
    Also reused the @nested_dataclass trick someone posted online to be able to create dataclasses with nested dataclasses members off of unpacked dictionaries.

  • @성수-o6h
    @성수-o6h Год назад

    I'm learning from you a lot. Many thanks!

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

    I've only used a handful of decorators in python, but what I'm curious about is what @abstractmethod brings to the table here, in the first section of the video. I'm familiar with the idea that declaring something abstract (in languages that allow it) prevents you from creating a subclass without providing your own definition of that method. Is that all that's being done here? I admit that not usually being a library programmer, I tend to just document what things need to be done rather than build out a hierarchy to make the compiler enforce it.

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

    Great video as always, I use the built in decorators but Ive never reach the point of making my own. It looks awesome but in practice I feel its a bit convoluted as an end user. I will definitely will try them out now. Thank you for the great video.

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

      Glad you liked the video! 😊

  • @tacozmacleo
    @tacozmacleo Год назад +8

    One more fantastic python guide. ❤️
    You make it easy to learn.
    Are you also going to tackle another programming language, like javascript?
    Or will that hurt your RUclips algorithm too much?

    • @ArjanCodes
      @ArjanCodes  Год назад +15

      I expect mixing programming languages will hurt the channel. But I might start another channel in the future that focuses on a different programming language.

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

    I really like functional programming and specially haskell. I often try to see how to reproduce haskell behavior in python for fun (and sometimes profit). Decorators were the obvious choice to implement currying. The not so obvious choice used by functools.partial (class) is much better, but requires more work to work properly.

  • @8Konrad
    @8Konrad Год назад

    thanks this super insightful guide! much appreciated

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

    Note that if you want decorators to support both sync and async functions, you can switch based on the value of inspect.iscoroutinefunction()

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

    I had a hard time understanding decorators in my high school days. Never created my own, but I think I might have to reconsider now

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

    Absolutely great video

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

    OH MY GOD IT FINALLY MAKES SENSE

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

    Is it common/good practice to allow exceptions to be raised inside a wrapper function?

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

    An amazing tutorial!
    Thanks

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

    great video, thx a million, making me revisit those ideas, i tend to forget ;)

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

      Thank you, glad you liked it!

  • @noureddineloug2703
    @noureddineloug2703 11 месяцев назад

    you are gods gift for me
    thank you very much.
    are not you planning for doing some projects in python.

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

    Hi Arjan. Your code examples from git have small mistake. When you check for prime number you forget to convert stop elm to integer => for element in range(2, sqrt(number) + 1). sqrt return float thats lead to TypeError Exception

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

    What is the difference between functools and setting default arguments in function?

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

      The difference is that with functools partial you can create different versions of the same function, but with a different value applied, while there’s only one possible default value. A second, more fundamental difference is that partial creates a new function that doesn’t even have the argument anymore.

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

    I usually use the decorators from packages, I didn't had the need to create stuff for myself.. but watching this video, I see there is a lot of small stuff I do a lot in my code that could be an decorator.. just low level stuff like error handling and logging..

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

    Superb, like always.

  • @MinThu-j4u
    @MinThu-j4u 13 дней назад

    Nodes i need blue tooth in location/ rotation? Can we do wireless on strings.lock ed on .scale is floopy.will it be ok..

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

    The most useful tip with decorators especially in-case where a decorator handles input, for example in authentication the best
    possible way to handle invalid input is to raise an Error : raise UnAuthenticatedError(message) then handle the error else where on your code, any other means of handling invalid arguments or invalid credentials is bound to cause problems with Flow.

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

      for example if you handle invalid arguments by passing along a variable or credentials , then if they are invalid and you forget to handle the case where the credentials where invalid in the method or function in which the decorator is being used, you may not find this bug... straight away,

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

      Yes, good points!

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

    Thanks Arjan!

  • @devstackdemystified
    @devstackdemystified 5 месяцев назад

    I gave the like, a nice way to decorate!

    • @ArjanCodes
      @ArjanCodes  5 месяцев назад +1

      I’ve decorated your comment as well 😎

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

    What if I want to decorate a function that I don't have access to? E.g. there is a lib_function from some library and I want to add a decorator to it?

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

    Love it!

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

    I was hoping that you would talk about ParamSpec near the end to be able to preserve the argument types of decorated functions for better autocomplete :)

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

    Very good!

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

    Hey, Can you make a video about the difference between decorator and proxy design patterns

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

    Several years ago the term "aspect oriented programming" was in vogue. Decorators seem to me _the_ way to implement AOP.

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

    He is back!!!

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

    Hold on, wasn't the point not to pollute the code? Now we're embedding and scattering @ signs. I'm confused. Are we supposed to wrap functions in a separate file and only there add the decorators?

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

    I use decorators in fastapi for user's token authorization.

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

    hey Arjan.
    can you share your thoughts on using result tuples such as the one below in python? good idea or bad idea?
    ```
    def result(func):
    def safecall(*args, **kwargs):
    try:
    return (None, func(*args, **kwargs))
    except Exception as e:
    return (e, None)
    return safecall
    @result
    def div(x, y):
    return x / y
    X = [1, 1, 1, -1]
    Y = [2, 0, [], 2]
    for x, y in zip(X, Y):
    err, res = div(x, y)
    if err:
    print(repr(err))
    continue
    print(res)
    >>> 0.5
    >>> ZeroDivisionError('division by zero')
    >>> TypeError("unsupported operand type(s) for /: 'int' and 'list'")
    >>> -0.5
    ```

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

    Lovely vidoe as always
    here is a video idea for you: How to Code inefficiently.

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

      Haha, good suggestion, with some reverse psychology :)

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

    I wanted to ask a question but writing my question answered it, thanks