Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
len means length, str means string.
idk man seems simple to me
But yes, the inconsistent naming is also annoying to me. It should always be snake_case.
Also, fuck Python 2
Pythons are adorable. They function as my little cuddle noodles. I really would like another ball python. ❤️
Oh, that python. Yeah it's alright.
I hate it from the bottom of my heart. I don't know why you even would use it. What's it's advantage over js, java, c or anything else?
C0D4695714yI can hijack MS products and automate shit, beyond that I don't normally use python.
Parzi89294yPython's great, and there's not a good unified naming scheme in many languages.
I love everything about Python except for the syntactical whitespace.
I use it a lot at work to automate or glue together a bunch of shit. Might deploy a web2py small application if I feel cute enough because shit like the admin interface and the alreadyhereforyouidiotstouse interface is a time saver.
But naming convetions, afterthought feel of oop, and the horrible use of __penis__ definitely annoys me. And I can't for the life of me remember to self on class methods, even after years of use.
I am meh about Python, but know it so well that I make due with my meh attitude towards it.
Py3 is _mostly_ compatible with Py2, except for some changes that couldn't be made without BC breaks - that's why it's called Python 3 rather than Python 2.8. The transition was long and painful, many people refused to adopt Py3 for various reasons. But now Py2 is officially dead, so things should be improving.
len() and str() doesn't bother me much, but syntax of for loop with indices does.
I prefer for(i=0; i<n; i++) style rather than enumerate(). Since python doesn't support ++ I'm ready to replace ++ with +=
And yes consistency of snake_case should be there. IT HAS TO BE FOLLOWED!
Large codebases in python sucks if they are inconsistent and even with consistency it takes time to understand.
If dunder methods are your weakness such as __call__ you will have hard time getting your head around OOP based codebases.
Oh another rant about naming conventions. Let's see who's right this time 😂
It would be nice if there were a global way of doing it, but there isn't. Different strokes for different folks. As long as it doesn't give you a stroke in the process.
As far as I understand those books (Clean Code, Design Patterns) are aimed to be used with OOP languages.
Python is not object oriented. It is rather a protocol based lang (somewhat similar to functional programming languages like C).
Protocol based because of those __internal_function__() functions like __len__(), __str__() and so on.
I also personally often struggle to name things in python. As far as i gather you use snake_case and ditch getters/setters in favor of properties.
Python is often described as "glue" since thanks to a lot of system library wrappers, you can often interact better with OS libs than in most other langs.
Also python is one of the langs that got popular not because it was hyped, has a lot of R&D invested, was named after another popular language (looking at you, JS!) or was a recommended and tightly integrated language for a given platform (e.g. C#).
Python got steadily better. PEP by PEP (Python Enhancement Proposal).
(Java also adopted PEPs as JEPs.)
Xoka12954y@pxeger Nailed it man! I wish I could give you a #MedalOfHonor :D
Python55844yMe when reading this thread
@pxeger if you created an account just for this single comment... Well done man, welcome here
Concision leads to ambiguity. Also meat grinders lead to sausage.
You would know len and str if you knew any C