Комментарии:
Excellent advice. Thank you for sharing.
ОтветитьI just watched this video, and after tip num 6, i have questions.
If we import modules outside of the function and using it in our function, then when we use the function in another file, do we get an error because we didn't import a module, or it will import automatically?
i loved your videos thanks a lot man
ОтветитьUseful information thanks
ОтветитьAt 3 mins into the video you pass a number of integer parameters to a function that has a type hint of float. You did not explain that parameters with a type of float will happily accept integers as well.
Ответитьreturn type is not working for me, still I can retrun other data type without any issue
ОтветитьVery useful tips, thanks 👍
ОтветитьI see you using PyCharm. Man of class 👍🏼
ОтветитьHi, I am using vs code and when I type hint my return type some of my keywords turn white. I am using vs code. Can anyone help me out here?
ОтветитьMan, you are awesome I loved this video I would like to watch more of these.
ОтветитьFew days ago, I needed to use a numpy function. One of the two parameters of that function is shape. I have no idea about the type of that parameter. So I refered to numpy docs. Sadly, there was no clue about that. But I got a link to source of code of that function. I felt very happy, because, I thought I can now read and understand what the shape is. But sadly, it was a parameter with default value None. And the docstring says nothing about the type or nature of that parameter. So at last, I decided to not use numpy and re arranged my code.
ОтветитьWhere can i get that white python hoodie?
ОтветитьI think avoiding the global keyword is the best tip because it usually means you need to define an object which handles internal or persistent data automatically. I really cannot think of an instance where you must use the global keyword.
ОтветитьGreat intermediate level tips! Thanks
ОтветитьCan you do a tutorial on how to properly write function/module documentations? Thanks!!!
ОтветитьI love how in the pre-type-hint-era, many Python devs were very smug about how amazing it is to not have to specify your types. Type Hints get added, and now they're all figuring out that being somewhat strict about what types you pass around actually makes sense.
It's almost as if being strict while writing makes things much easier when reading.
Sometimes I need the global functions, idk why they are so bad
spaghetti code
hi. for function return notation (point 1) why not just look at the return statement or add a comment to have notation of return type? are there any other advantages to this style of notation that make up for (visually) turning code into garbally gouk?
ОтветитьSome great tips, thanks ☺. Is there a pythonic reason for all lower case function names with an under in between words? I personally don't like the underscore in function names and prefer PascalCase (uppercased first letter of each word in the function name) for names, they stand out more.
ОтветитьI've been binging your videos lol they're so great. If you haven't already, I'd love to see you make a video about generators and the "yield" keyword. I really don't understand it but I'm sure you could explain it well :)
ОтветитьGood stuff! I still make that #4 mistake quite often in my python apps and pay for it later with code refactors haha
ОтветитьUse match statements with walrus... Deadly combo for beautification of this code
ОтветитьFor tip 4, is it something like making the functions as atomic as possible? (I borrow the term "atomic" from databases which means the smallest components)
Ответитьthank you so much. Your chanel helps me a lot to improve my learning of python. Good practices, tips etc. So this morning, I changed my code to add these good practices ;) Very nice these little videos on specifics points. Congrats
ОтветитьWow, I didn't even know I could specify return type and parameter type in python! I used to think that my python code looked super messy and potentially unpredictable compared to other languages. I'll definitely be making use of this!
ОтветитьHey second or third probably
ОтветитьHow do you do that arrow head after the def func?
Ответить