On 12/01/24 12:56, Chris Angelico via Python-list wrote:
On Fri, 12 Jan 2024 at 08:56, Left Right via Python-list
<python-list@python.org> wrote:
By the way, in an attempt to golf this problem, I discovered this,
which seems like a parser problem:
When you jump immediately to "this is a bug", all you do is make
"seems"!
but yes, it is a (much) less-likely explanation.
yourself look like an idiot. Unsurprisingly, this is NOT a bug, this
is simply that you didn't understand what was going on. The grammar
isn't easy to read, and it's usually better to read the documentation
instead.
Those of us who studied Computer Science may well have been
taught/expected to learn how to read [modified] BNF - indeed to have
worked in that (cf coding in Python).
Accordingly, the English text is likely easier to understand, but
sometimes the BNF offers finer-detail or can be used to clarify some
mis- or insufficiently-understood aspect of the text. IMHO/YMMV/etc...
(Plus, golfing isn't really a goal in Python, and you didn't shorten
the code by much at all. Good job.)
I took my hat off to the poster, being prepared to dive-in and do this.
Accordingly, was more than happy to help set him/her back onto 'the
straight and narrow'.
(yes it was a BNF-failing - which, credit where credit's due, I think
was realised at the same time as response was typed)
How many others just want us to do all their thinking for them?
(there's a rude comment about wiping noses - but probably a step too far
wrt the CoC)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list