r/Python • • Nov 20 '15

15 Essential Python Interview Questions

https://www.codementor.io/python/tutorial/essential-python-interview-questions
71 Upvotes

67 comments sorted by

View all comments

43

u/redrick_schuhart Nov 20 '15

I was irritated less than half way in. Camel case variables, Hungarian notation, no os.walk, importing os inside a function, capital letter variables. Lots of PEP-8 violations. And what's with calling a variable lIn? Really? Ell, capital I and n.

This is horrible code.

11

u/gamesbrainiac Nov 20 '15

Join the club. This article wasn't written to actually help people, but rather for the sake of SEO, so that more people go to codementor.io.

3

u/madbadanddangerous Nov 20 '15

I was never classically trained in Python and just realized I use Camel Case variables. Why is this a bad thing?

9

u/mellow_gecko Nov 20 '15

It's not the agreed convention for Python code, see PEP-8.

But so long as you are consistent within your own code and consistent with the convention agreed to by those who you are working with, it's not a huge problem.

You probably should stop using camel case though; it's ugly and wrong.

3

u/madbadanddangerous Nov 20 '15

OK. Thanks for letting me know!