python bug in this list implementation?
Christoph Zwerschke
cito at online.de
Wed Dec 28 09:07:52 EST 2005
Steven D'Aprano wrote:
> On Wed, 28 Dec 2005 07:29:41 +0000, Chris Smith wrote:
>>
>>def createGrid():
>> f = open(r"...sudoku.txt", "rb") ## see attached for the file.
>
> Why do you need a raw string? It isn't wrong to do one, but it is rather
> unusual and unnecessary.
Chris is probably working on Windows where it is handy to enter paths as
raw strings because of the backslashes. Unusual however, and problematic
if you want to use the program on other platforms, is opening a text
file in binary mode.
-- Christoph
More information about the Python-list
mailing list