Pascal vs Snake Case

Current Course: https://app.dataquest.io/m/352/object-oriented-python/3/defining-a-class

I was going through the above lesson and learned about case conventions.

I saw that snake(this_that) is used for variables and functions. I realized that at least DataQuest was using this way to name things, I just didn’t realize it was actually called something.

Whenever I code outside of the normal python answer checking screen I pretty much just always capitalized the first letter of each word(Pascal) instead of using underscores because for me, it is faster for me to type that way.
.
Would that become an issue later in terms of working with teams etc?

Should I keep towards the traditional conventions like using Snake Case for variables and using Pascal for classes? Or is it okay for me to just name everything using Pascal?

It might. Most teams have a style convention that you’ll need to adhere to, and it’s likely that regular variable names will be in snake case since that’s a wide-reaching convention in Python.

There might be a better reason to get into the habit of snake case, though. I feel like if I look at Python code and someone is using unusual capitalization conventions, I have some sort of inner bias that makes me think that the person is not a particularly experienced Python programmer.

I can’t be sure that other people feel the same way, but from the perspective of working towards getting a job (on the assumption that you are), it might be worth making the change earlier rather than later so your work looks more professional.

2 Likes

Okay, sounds good! Thanks :smiley: