Graham Wideman added the comment:
Demonstration:
print("x" + r' \' ' + "x") produces
x \' x
Where is this behavior _ever_ useful?
Or if there is some use case for this, how frequent is it compared to the
frequency of users expecting either that bac
Graham Wideman added the comment:
Let us be clear here that this is NOT a case where the backslash escapes the
subsequent quote. If it WAS such a case, then the sequence \' would leave only
the quote in the output string. But it doesn't; it leaves the complete
2-character \'
Graham Wideman added the comment:
@R David: I agree with you. Thanks for extending the line of thinking I
outlined.
--
___
Python tracker
<http://bugs.python.org/issue20
Graham Wideman added the comment:
@Andre:
_I_ know more or less the explanations behind all this. I am just putting it
forward as an example which touches several concepts which are needed to
explain it, and that a programmer might reason with to change a program (or the
environment) to
Graham Wideman added the comment:
At the moment I've run out of time to exert much forward push on this.
By way of temporary summary/suggestion for regrouping: Focus on what this page
is intending to deliver. What concepts should readers of this page be able to
distinguish and understand
Graham Wideman added the comment:
Marc-Andre: Thanks for your latest comments.
> We could also have called encodings: "character set", "code page",
> "character encoding", "transformation", etc.
I concur with you that things _could_ be call
Graham Wideman added the comment:
Marc-Andre:
Thanks for commenting:
> > 2. 1. Python string --> some other code system, such as
> > ASCII, cp1250, etc. The destination code system doesn't
> > necessarily have anything to do with unicode, and whole
> > range
Graham Wideman added the comment:
Antoine:
Thanks for your comments -- this is slippery stuff.
> It's better, but how about simply "In this article"?
I was hoping to inform the reader that the hex representations are found in
many articles, not just special to this one
Graham Wideman added the comment:
A further issue regarding "one-to-one mappings".
Article: "Encodings don’t have to be simple one-to-one mappings like Latin-1.
Consider IBM’s EBCDIC, which was used on IBM mainframes."
I don't think this paragraph is about one-to-one
Graham Wideman added the comment:
> Do you want to provide a patch?
I would be happy to, but I'm not currently set up to create a patch. Also, I
hoped that an author who has more history with this article would supervise,
especially where I don't know what the original intent w
New submission from Graham Wideman:
The Unicode HOWTO article is an attempt to help users wrap their minds around
Unicode. There are some opportunities for improvement. Issues presented in
order of the narrative:
http://docs.python.org/3.3/howto/unicode.html
History of Character Codes
New submission from Graham Wideman:
FAQ entry:
http://docs.python.org/3/faq/programming.html#how-can-i-get-a-dictionary-to-display-its-keys-in-a-consistent-order
claims that there's no way for a dictionary to return keys in a consistent
order. However, there's OrderedDict which shoul
Graham Wideman added the comment:
Hi Vinay, thanks for commenting. And of course for your efforts on py.exe (and
no doubt the debate process.)
I am trying to draw attention to the situation where the script has no shebang
line, and there is no other explicit configuration info for py.exe
New submission from Graham Wideman:
Python Launcher for Windows provides some important value for Windows users,
but its ability to invoke python versions not on the PATH is a problem.
py.exe chooses a version of Python to invoke, in more or less this order of
decreasing priority; it is the
Graham Wideman added the comment:
David:
Yes, as it turns out you are absolutely right, in a manner of speaking. I have
retested this exhaustively today, and here's the root cause.
It turns out that in testing, I must have activate a particular simplified test
script by invoking
New submission from Graham Wideman:
The docs appear to be incorrect for CSV at:
http://docs.python.org/3.3/library/csv.html.
Per issue http://bugs.python.org/issue7198 , there's a long history of
contention between os.open and csv.writer, in which, on Windows, the default
result
Graham Wideman added the comment:
@Vinay Sajip Thanks for looking at this issue and adding the link to PEP 405,
and your explanation "When working..." with helpful shebang comments.
That said, the combination of PEP 405 and this updated page doesn't clear
things up completely.
Graham Wideman added the comment:
Thanks R. David for your comments.
> It should also mention that the activation is per-shell-session,
.. which also has implications (or lack of effect) for launching from Windows
Explorer, for example.
Seems like in practical use, one would need to set u
Graham Wideman added the comment:
Additionally on the subject of venv docs: I would encourage making it more
clear regarding how activate changes the user's PATH. Both
http://www.python.org/dev/peps/pep-0405/ and
http://docs.python.org/3.3/library/venv.html talk about how activate add
New submission from Graham Wideman:
http://docs.python.org/dev/library/venv.html
More detail needed regarding the original python environment
The article explains how to use venv to create a new python installation with
independent libraries etc, and a means to activate one or another virtual
Graham Wideman added the comment:
"Prepend" appears in every online dictionary I consulted. For a dictionary to
list it and give the usual meaning for it, pretty much demonstrates "prepend"
functioning as a real word. That and its 1.3 million hits on google.
"Prepend&
Graham Wideman added the comment:
> "Public name" is a term that describes a convention, not anything enforced by
> the interpreter.
And I guess that's really the main point. In other languages Public means
accessible, and Private means not so. In Python, Public
Graham Wideman added the comment:
Hi Nick: Thanks for your additional points. Comments inline:
> __all__ only affects import *, and may also affect documentation tools (e.g.
> pydoc will respect __all__ when deciding what to display). It has no effect
> on attribute retrieval fro
Graham Wideman added the comment:
Hi Eric, Thanks for starting to review this, and your responses are
encouraging. Some comments inline below.
FWIW, along the way I accumulated my own notes on this topic, on some pages
here:
grahamwideman.wikispaces.com
(Left navigation panel...)
Software
New submission from Graham Wideman :
In Language Ref section 7 "Compound Statements":
http://docs.python.org/release/3.1.3/reference/compound_stmts.html
there's a footnote regarding what happens to unhandled exceptions in a
try-except statement:
[1] The exception is pr
New submission from Graham Wideman :
The overall scope of this issue is that current Python documentation gives
vague, sometimes incorrect, information about the set of Python features
involved in modularizing functionality. This issue presents an obstacle to
programmers making smooth
Graham Wideman added the comment:
Eli: Excellent and thoughtful point. This would indeed be exactly the place to
suggest os.path.join as an alternative.
In addition, there are still occasions where one needs to form a string with
trailing backslash. Two examples:
1. When writing the string
Graham Wideman added the comment:
Thanks to all for your patient comments. I think I am resigned to raw-string
forever being medium-rare-string :-).
Perhaps it's obvious once you get over the initial shock of non-rawness, but
workarounds for the disallowed trailing backslash include
Graham Wideman added the comment:
@Glenn Linderman: I too am usually quick to assume that "innocent fixes" may
have serious unforeseen impacts, but in this case I'm not convinced. What
would matter is to enumerate the current behavior, and of that what would be
changed. Y
New submission from Graham Wideman :
This is a copy of issue 1271 because I couldn't find a way to reopen it.
So, repeating my comment here:
As it currently stands, backslash at end of string is prohibited, apparently in
the interests of supposedly allowing backslash to escape quotes
Graham Wideman added the comment:
(Not clear how to reopen this issue. Hopefully my change here does that.)
OK, so as it currently stands, backslash at end of string is prohibited in the
interests of allowing backslash to escape quotes that might be embedded within
the string.
But the
Changes by Graham Wideman :
--
nosy: +gwideman
___
Python tracker
<http://bugs.python.org/issue4033>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Graham Wideman :
On the csv doc page (.../library/csv.html) most of the examples show creation
of an anonymous file object within the csv.reader or csv.writer function, for
example...
spamWriter = csv.writer(open('eggs.csv', 'w'), delimiter=
33 matches
Mail list logo