Weekly Update 118: Up close with Python
This is a copy of our weekly newsletter for developers which you can subscribe to here.
Since the start of the mission, Instant Answer coverage for Python-related queries has increased from 35% to 46%. A lot of this is due to improvements with Python docs, but progress has also been made for Django and with tutorial snippets. For example:
- New coverage for class methods
- Improved answers by looking for namespace conflicts
- A new lookup for Django docs
- Get snippets from Dive into Python tutorials
As you can see, this is really helping Python developers and it's thanks to the contributors in our community, in particular Robert and Jussi. Why not join them and help get the Python Instant Answer coverage to 50% and beyond? Details and current status are in the Python Overview post on the forum, where Jason and Zaahir are happy to help.
And now, here are some specific issues we're currently looking for help with...
- Python: Abstracts missing new line
We need to update the parser to better handle this.
- Add ideas to the Python Brainstorming discussion
What kinds of IAs would you love to see? What would save you time or make you more productive?
- Build a Fathead for a popular Python package
There are a few suggestions here but perhaps you know of a better one?
- Try building an interactive1 REPL (Read-Evaluate-Print-Loop) for Python
This is quite a challenge because of authentication with a backend service, but not impossible.
I'm going to follow the trend of the past two weeks and make the "back-to-basics" tips a trilogy!
When you're learning a programming language, it's common to copy and execute chunks of code from a book or tutorial, but inevitably they sometimes fail. Because the language is new, it's difficult to find the problem quickly and the error messages often don't help, so before you get stuck, here's something to try...
Deliberately make errors
That's right — I want you to put bugs in your code on purpose! When you do, check the resulting error message and make a note of it. For example, you could:
- Use a variable without declaring it.
- Use the wrong number of arguments for a function.
- Remove a character such as a parenthesis or semi-colon.
- Spell important words wrong in various parts of the code.
Repeat this a few times and you'll soon learn what causes common error messages, meaning that when they appear "for real" it should be much faster for you to find and fix the problem.
You could even use it as an excuse if you mess up in future: "Oh yeah, that bug is supposed to be there!"
Happy coding everyone and enjoy your weekend!
- The DuckDuckGo Staff