Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197445 > unrolled thread
| Started by | Left Right <olegsivokon@gmail.com> |
|---|---|
| First post | 2025-05-11 12:36 +0200 |
| Last post | 2025-05-12 13:55 -0700 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: backslash in triple quoted string Left Right <olegsivokon@gmail.com> - 2025-05-11 12:36 +0200
Re: backslash in triple quoted string Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-05-11 15:02 -0700
Re: backslash in triple quoted string Left Right <olegsivokon@gmail.com> - 2025-05-12 20:42 +0200
Re: backslash in triple quoted string Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-05-12 13:55 -0700
| From | Left Right <olegsivokon@gmail.com> |
|---|---|
| Date | 2025-05-11 12:36 +0200 |
| Subject | Re: backslash in triple quoted string |
| Message-ID | <mailman.36.1746959805.3008.python-list@python.org> |
Then it just means that the grammar lies. The two claims are mutually exclusive, so either one is a lie or the other or both. My comment was more of an irony really. It's plenty obvious that the grammar is a lie. The reason is that it's tedious to put the actual intender rules into the grammar, and so whoever wrote the grammar decided to cut corners. But, the grammar is supposed to be the authoritative source for how the language is parsed, that's why even though it's clear that the grammar is a lie, blaming whoever doesn't follow it makes it ironic. In other words, the grammar author didn't put enough effort into making grammar actually work, but seeing how many other things are done in Python, this is not an exception. It would've been strange to have it done properly when "properly" means doing copious amounts of tedious work. On Sun, May 11, 2025 at 12:11 PM Peter J. Holzer via Python-list <python-list@python.org> wrote: > > On 2025-05-08 08:05:54 +0200, Left Right via Python-list wrote: > > Also, it appears that the change linked above is a lie: > > Such strong words ... > > > > https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-python-grammar-longstringitem > > > > According to the grammar, any character can follow backslash in a > > valid Python program. The warning / error raised by this code should > > not be a syntax error / warning because the syntax is correct. > > Warnings are about technically correct but probably unintended usage. > > The documentation you linked to describes (a bit further down) which > escape sequences are recognized and what happens if you use an > unrecognized escape sequence. It also mentions that using an > unrecognized escape sequence *will* be an error in future versions of > Python. > > A warning is appropriate here. It gives the programmer a chance to fix > the program now before it breaks. > > One could argue that it should say 'unrecognized escape sequence' > instead of 'invalid escape sequence', since it isn't invalid yet, but > that's nitpicking. > > hjp > > -- > _ | Peter J. Holzer | Story must make more sense than reality. > |_|_) | | > | | | hjp@hjp.at | -- Charles Stross, "Creative writing > __/ | http://www.hjp.at/ | challenge!" > -- > https://mail.python.org/mailman/listinfo/python-list
[toc] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2025-05-11 15:02 -0700 |
| Message-ID | <87msbikdqa.fsf@nosuchdomain.example.com> |
| In reply to | #197445 |
Left Right <olegsivokon@gmail.com> writes:
> Then it just means that the grammar lies. The two claims are mutually
> exclusive, so either one is a lie or the other or both.
[...]
A couple of points.
First, the convention in this and most other Usenet newsgroups
is to write new text *below* any quoted text. This is known as
"bottom-posting". The alternative, "top-posting" is common in
email in some environments, but tends to cause confusion on Usenet.
It's also a good idea to trim any quoted text that's not relevant to
your followup. See most of the other followups in this newsgroup,
including this one, for examples. Even if you happen to prefer
top-posting, I suggest trying to follow the existing conventions
observed by the vast majority of participants here.
Second, the word "lie" is far more harsh than what I presume
you meant to say. For me, and I think for most people, the word
"lie" implies a deliberate intent to deceive. I don't think you
actually believe that the authors of the documentation you're
complaining about deliberately inserted false information with the
goal of deceiving readers. If you want to say that the grammar
is incorrect, or contains an error, that's something that can be
discussed reasonably. If you say that it "lies", you're making a
claim of malice and making assumptions about someone else's state
of mind with no real basis. Perhaps that's not what the word "lie"
means to you, but I suggest that it explains the harsh reaction to
your initial statement.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Left Right <olegsivokon@gmail.com> |
|---|---|
| Date | 2025-05-12 20:42 +0200 |
| Message-ID | <mailman.50.1747075351.3008.python-list@python.org> |
| In reply to | #197457 |
> Second, the word "lie" is far more harsh than what I presume > you meant to say. For me, and I think for most people, the word > "lie" implies a deliberate intent to deceive. No, it doesn't. Consider Joseph Conrand's Heart of Darkness, the final episode where Marlow comes to Kurtz' widow and tells her about how her husband died. He lies to her, but his intent is not to deceive her, instead, he intends to make sure that her delusion of her late husband is unharmed and that she continues to live that delusion because he judges she will be better off for it. In fact, you yourself used the word deceit, which is to lie with intention to benefit from a lie. But people tell lies for all sorts of reasons. People can lie by omission, through embellishment, by choosing to focus on less relevant aspects of the event. All of these are lies. When a painter mixes white paint into the form shadow of a plaster ball, she lies. When Google Maps puts the destination marker of the restaurant you have a reservation in in the middle of a sea, it lies. English literature lessons aside, even if you believe what you believe about the meaning of the word, you could at least try to find the irony, that was the larger goal, than to immediately presume you are being attacked, and start retaliating instead of looking into the problem.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2025-05-12 13:55 -0700 |
| Message-ID | <87y0v11rdb.fsf@nosuchdomain.example.com> |
| In reply to | #197461 |
Left Right <olegsivokon@gmail.com> writes:
>> Second, the word "lie" is far more harsh than what I presume
>> you meant to say. For me, and I think for most people, the word
>> "lie" implies a deliberate intent to deceive.
>
> No, it doesn't. Consider Joseph Conrand's Heart of Darkness,
No, thank you.
I am trying to help you to understand how people are reacting to
your posts. I suggested that saying that the grammar is incorrect
or contains an error would have expressed exactly what you intended
without triggering hostile reactions, which I'm assuming you
don't want.
[...]
> English literature lessons aside, even if you believe what you believe
> about the meaning of the word, you could at least try to find the
> irony, that was the larger goal, than to immediately presume you are
> being attacked, and start retaliating instead of looking into the
> problem.
I'm not aware that I have been attacked or that I have retaliated.
(No need to explain why you might think I have.)
One more thing: your Usenet or email client probably adds an
attribution line above any quoted text. I urge you to leave it
in place. It makes the discussion easier to follow, especially for
those of us who read the comp.lang.python Usenet newsgroup rather
than the mailing list.
I do not intend to reply further.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web