Don't Run Code Directly, Use A Main Function // Python Tips

preview_player
Показать описание


🎓 Courses:

👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

👀 Code reviewers:
- Yoriz
- Ryan Laursen
- Sybren A. Stüvel
- Dale Hagglund

#arjancodes #softwaredesign #python

DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Рекомендации по теме
Комментарии
Автор

Clear and elegant as always. Thanks Arjan for all the content you create for us!

alexandrepereira
Автор

Hi. Please do more of these videos.
I know that there are a lot of videos out there doing python courses, but your way of explaining python concepts is exceptional. You're like a perfect version of an educator. This concerns manner of speaking, succinctness, limited code (snippets) and choice of topics.
I'd love to get an introductory up to intermediate level python course from you.

Thanks for making these awesome videos.

micleh
Автор

Really good and simple video! Great content! Maybe you can make a video about clean architecture?

Sebaaeza
Автор

once again, another great tip! Keep it up!

SpaghettDev
Автор

Love your videos, they're a life saver! What is the song that you use in those shorts, I wanna listen to them!

Elywely
Автор

I found some really useful videos from you. Good explanation, interesting ideas. There are new things for experienced developers also.
But I do not like is this format. I think normal landscape videos with the conventional controls are much more preferred.

Автор

Are variables not block scoped? In JavaScript they are, but in Python are they only function scoped then?

sven_
Автор

@ArjanCodes Hello can you make a short video about Python Guard clauses please!

danzobisk
Автор

Can you please cover vectorisation? I have been searching forever but can't seem to find any resources that explain it clear and simply.

stephenlew
Автор

The trouble with a script file that you want to work as both an executable and a module is you have to give it a name ending in .py for the latter purpose. Whereas on *nix systems, it is common for executables to not have extensions, because why should the user care what language the program is written in?

lawrencedoliveiro
Автор

Make sure new ppl know that the Main method has nothing to do with if name == main

champfisk
Автор

so _main would be even better than main?

tooru
Автор

This makes sense and all, but I *really* don‘t like the extra level of indentation. Why not write this:

If __name__ != „__main__“:
sys.exit()

# unindented main code

benhbr
Автор

do you mean circle object at 0:14 not class, cant you create new circle objects anywhere in the script ?

CammyBear