Only Python
11h30 14  mars
Friendly version 0.3 has been released
Friendly version 0.3 has been released. This version also marks the official name change from the former friendly-traceback.Before I started working on Friendly, I assumed that to do custom exception handling, one simply had to redefine sys.excepthook. However, I since found out that this does not...
16h58 06  mars
Going back in history
Imagine that you wish to run a program that takes a long time to run. Just in case somethings goes wrong, you decide to use friendly-traceback (soon to be renamed...) in interactive mode to run it.  This turns out to be a good decision:Time to explore what might be the problem, and where...
19h56 05  mars
Friendly-traceback will have a new name
tl; dr: I plan to change the name from friendly traceback to friendly. When I started working on Friendly-traceback, I had a simple goal in mind:Given an error message in a Python traceback, parse it and reformulate it into something easier to understand by beginners and that could be...
15h42 27  février
Friendly-traceback: testing with Real Python
Real Python is an excellent learning resource for beginning and intermediate Python programmers that want to learn more about various Python related topics. Most of the resources of RealPython are behind a paywall, but there are many articles available for free. One of the free articles...
12h33 18  février
My wish for Python 4
I love Python. A few years after I started using it, I saw someone writing about it and using the phrase "it fits my brain": this is very much how I feel ... at least, for simple straightforward code that doesn't rely on weird metaclass constructs, or even with the added...
15h34 11  février
Friendly-traceback's www function
Today, I saw some write up that Friendly-traceback was discussed on the PythonBytes podcast. A comment made during that podcast suggested that it would be useful if an internet search could be performed, perhaps using a function named www. (Another name was mentioned). So, of course I immediately...
22h13 04  février
Python's tug of war between beginner-friendly features and support for advanced users
Python is my favourite programming language. Since I discovered it in 2004, programming in Python became my favourite hobby. I've tried to learn a few other languages and have never found one as friendly to beginners as Python. As readers of this blog know, these days I am particularly...
12h14 25  janvier
Friendly-contest: we have a winner
amp;nbsp;Since my last post, no new issue has been filed. As the deadline has passed (8 am, AST), I have written a short program to randomly draw a winner. In my last post, I listed incorrectly the entries which I double-checked prior to writing the program, which I tested a few times before the...
15h31 24  janvier
Friendly-contest: 20 hours left
There is only 20 hours left in the Friendly-traceback contest: write bad code to win a prize. After a slow start, there has been quite a few submissions lately which will definitely help to improve Friendly-traceback. Some submissions included references to StackOverflow questions and were thus...
11h36 23  janvier
Friendly contest: two days left after a surge of submissions
This is just a quick update.Yesterday, the number of valid entries jumped from 9 to 23. Many of them have given me ideas on how to make Friendly-traceback better at finding the cause of the error but a few of them are likely going to be impossible for Friendly-traceback to evaluate properly and...
11h19 22  janvier
Contest: 3 submitters, 3x3 entries, 3 days left
amp;nbsp;The contest I announced for Friendly-traceback has resulted in a total of  nine entries so far from three different programmers.  Two of the cases submitted have already been fixed in the development version. They also gave me some ideas to explore other possible cases...
17h02 18  janvier
Don't you want to win a free book?
amp;nbsp;At the end of Day 2 of the contest, still only one entry. If this keeps up, by next Monday there will not be a draw for a prize, and we will have a winner by default.The submission was based on the use of slots . In playing around with similar cases, I found an AttributeError message...
13h07 17  janvier
Friendly contest: the race is on
tl; dr: Python was wrong ;-)After one day, I've had one valid entry submitted to the contest I announced yesterday; I've also had two other submissions from the same contributor that I deemed to be invalid for the contest. The submissions shared a similar characteristics to a different...
16h23 16  janvier
Write bad code to win a prize
amp;nbsp;SummaryGet a chance of winning a prize by writing code with ONE error that Friendly-traceback cannot properly analyze, in one of three categories:SyntaxError: invalid syntaxSyntaxError: some message, where some message is not recognized.Any case of NameError, AttributeError,...
13h53 20  décembre
Friendly-traceback du jour (Dec. 20 2020)
amp;nbsp
18h20 19  décembre
Friendly-traceback du jour (Dec. 19 2020)
amp;nbsp
19h23 18  décembre
Friendly-traceback of the day (Dec. 18 20)
Feel free to make suggestions as to what other Exception could benefit from a Friendly-traceback treatment.
12h55 17  décembre
pytest apparently modifies calls to range
amp;nbsp;As I work making Friendly-traceback provide more useful information regarding the cause of an exception, I sometimes encounter weird "corner cases" about either Python itself [1] or occasionally about pytest [2]. Today, it was pytest's turn to give me a new...
01h50 10  décembre
IPython and Friendly-traceback
amp;nbsp;This is a quick update on the status of Friendly-traceback. As of today, it works with the IPython console, and works even better in a JupyterLab environment.  First, a comparison with using it in the new Windows terminal making use of Rich for syntax highlighting, which...
22h02 24  octobre
Friendly-traceback: work in progress
amp;nbsp;It's been almost two months since my last blog post and I feel guilty of not having taken the time to write more regularly.  I should really tell you about how fantastic Will McGugan's Rich is, and how I have customized it for my projects. I should also tell you how...
20h45 29  août
Friendly-traceback is now in beta
amp;nbsp
11h14 22  août
What, where, why?
amp;nbsp;I do need to document this ..
00h05 11  août
Rich Friendly-traceback: first look
amp;nbsp;After a couple of hours of work, I have been able to use Rich to add colour to Friendly-traceback. Rich is a fantastic project, which has already gotten a fair bit of attention and deserves even more.The following is just a preview of things to come; it is just a quick proof of concept...
02h38 05  août
Identifying misleading type hints
Yesterday on Twitter:For beginners, unintentional type hints can be really confusing.  No SyntaxError, no traceback to guide the beginners ... Still, could Friendly-traceback help?I've already mentioned how Friendly-traceback could be used by Thonny, and how it could also be used with...
11h46 29  juillet
HackInScience: friendly Python learning
A short while ago I discovered HackInScience, a fantastic site for learning Python by doing exercises. It currently includes 68 programming exercises, with increasing level of difficulty.I learned about it via an issue filed for Friendly-traceback: yes, HackInScience does use Friendly-traceback to...