homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjdmol2
Recipients jjdmol2
Date 2009年12月31日.08:42:40
SpamBayes Score 8.1118445e-13
Marked as misclassified No
Message-id <1262248963.08.0.673944744724.issue7611@psf.upfronthosting.co.za>
In-reply-to
Content
The shlex parser parses "foo#bar" as "foo", discarding the rest as a
comment. This is actually one of the test cases, even in POSIX mode.
However, POSIX (see below) only allows comments to start at the
beginning of a token, so "foo#bar" has to result in a "foo#bar" token.
To easily see this, do "echo foo#bar" in bash, versus "echo foo #bar".
Fixing this might break some applications that rely on this broken
behaviour, even though they're not strictly POSIX compliant.
POSIX 2008, Rationale C.2.3 (which refers to Shell & Utilities 2.3(10)):
The (10) rule about '#' as the current character is the first in the
sequence in which a new token is being assembled. The '#' starts a
comment only when it is at the beginning of a token. This rule is also
written to indicate that the search for the end-of-comment does not
consider escaped <newline> specially, so that a comment cannot be
continued to the next line.
History
Date User Action Args
2009年12月31日 08:42:43jjdmol2setrecipients: + jjdmol2
2009年12月31日 08:42:43jjdmol2setmessageid: <1262248963.08.0.673944744724.issue7611@psf.upfronthosting.co.za>
2009年12月31日 08:42:42jjdmol2linkissue7611 messages
2009年12月31日 08:42:40jjdmol2create

AltStyle によって変換されたページ (->オリジナル) /