Honestly, this is because the organization of the Python 3 docs is terrible.
The documentation for str.replace is located halfway down an enormous page that describes every single built-in type in the language [1].
And then, once you manage to find the entry for str.replace, what does it tell you?
Return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
That's it. No examples, no link to re.sub or other functions you might want to use for replacement. Stack Overflow or even W3Schools (gasp!) is much better results for this.
Incidentally, if this is the level of information you are looking for, you can get the same thing by typing help(str.replace) in the Python interpreter.
I wouldn't expect the official documentation for anything to fare well with web search algorithms. This is probably a place where I'd support manual intervention, to boost docs/manuals/man pages/etc.
I for one have never cared for the Python Doc Site and layout. Too much info for a "quick" lookup. I only need 1 line of code to show me how to replace strings in p3
Maybe because more people who types those queries find the first result from GeeksforGeeks page more useful ?
People searching for those are more likely beginner programmers. Being an old unix geek, I personally do like the official documentation better but it's true the official documentation is a lot more obtuse for beginners, whereas that first result looks a lot more friendly with examples, etc.
It's gotten bad for me. I'm just glad others have started noticing. Google search's integration with other services make it hard to leave, but I'm seriously considering switching to a different search engine, and I've been using google search since it was in beta.
My experience is that DDG results are now on par with google's (minus the brute force effect that the country selector is on local results. Without it, no Irish sites can be found, with it, Irish blogspam will get rated above the site I want, so I need to keep toggling it).
This isn't really down to any huge improvement on DDG, but rather a decline in Google's results. I'd just been putting it down as a consequence of Google having less data on me as I made a conscious effort this year to diversify my usage of other sites.
DuckDuckGo isn't yet on par with Google and will never be (hopefully) because that would mean they keep track of users searches and other data, which is the reason most of us don't use Google for. Privacy is not free, and a bit less accuracy when searching online is a small price to pay.
However although DDG is not going to surpass Google in that field, it is indeed getting better and better every year, and there's one thing it could seriously spank Google's ass: implementing a working discussion filter.
The discussion filter was one of the most useful filters Google once had: using it in a search meant one would get only results from blogs, forums, Usenet etc, that is, comments from users of X rather than sellers or advertisers promoting that X. It wasn't perfect but helped a lot to filter out shills, astroturfers, fake forums and similar trash, therefore it didn't suprise me much when they removed it probably because their sponsors didn't like that function. So why not implementing it back at DuckDuckGo?
Same here, I’m getting pretty bad results. The SERPs for me include either news results which I really am not interested in or spammy auto-generated stuff that has almost no relevance.
If you're looking for alternatives, DuckDuckGo has made vast improvements over the last 6-12 months. Tried switching about a year ago and went back to Google due to low quality results.. Gave it another whirl this month and the difference is night and day. I've barely used Google since. Definitely give it a shot if you haven't recently, you may be pleasantly surprised!
I was going to say "breitbart", but I realized that Google doesn't actually filter that site. I tried to think of something that definitely would get filtered, and I came up with that. The example I gave above is what I had in mind.
Instead, I get (in order):
1. GeeksforGeeks
2. Tutorialspoint
3. W3Schools
4. Programiz
5. Stack overflow
6. And then, finally, the official documentation... For python 2.7.
How does this happen? Are these sites just paying Google a bunch for the rankings?