Why are the functions in camel case if it’s python?
Why not? Camel-case is generally nice to use, and (for me at least) makes it easier for me to read.
I guess, but isn’t it ultimately up to the coder on how to style their code?
Yes it’s perfectly fine for your own code, but if you’re publishing a package I just think it looks a bit weird to other people who read and use the package
Because that is what I prefer ;-;
Also, the _ is hard to get to when coding on mobile.
I always am pained when people use _’s in their names, so ig it is just preference
Also:
mixedCase is allowed only in contexts where that’s already the prevailing style
I probably need a setup.py to get that to work, I will have to figure it out.
While that is true, I (for some reason) think it’s ugly (maybe because Go and C# use it badly?). I prefer all lowercase or snake_case, and occasionally (although it’s bad practice) kabob-case
I think it is completely by what you are taught, as I am the complete opposite. (I think snake case is ugly)
I say camelCase as the way it’s formatted, is that just me?
I prefer camelCase rather than snake_case because the underscores are just a bit annoying, only use it when I want to leave myself a mental note for a variable.
I will occasionally use snake_case or (Is this a thing?) snake_Camel, but I usually just use camelCase.
<small>I'm small :)</small>
I’m small
There is an agreed standard for every language and for python it is PEP8.
Do you need to use it? No.
Why should you use it? If you work with others as most likely they will use also PEP8 (or some other internal format) and you would like to have consistent code.
what is PEP8 and how have I never heard of it.
I’m not very likely to use it lol
I mean, they might use it, but until now I didn’t even know that PEP8 exists (thus what it is) so what are the chances that they will know either.
Consistency goes from person to person as to what they think is “consistent”
“Use 4 spaces per indentation level.”
No, I refuse to read anything else.
If you work in professional team you will need to adopt a standard.
If you want to work on open source, you need to use a standard.
etc etc
Generally that is PEP8 for python, other languages have other styling standard. I started using it once i realise other people needed to use my code … till then I could not care less.
Please DO NOT USE TABS!!!
PS: your IDE is turning them in spaces most likely anyhow
*professional team?
Yeah, I get that I would need one then, but rn I do it pretty much as a hobby
I wouldn’t call it a necessity, perhaps a strong recommendation.
P.S.: @whileTRUEpass I like ur pfp