Mitchell Model <m...@acm.org> added the comment:

>David W. Lambert <lamber...@corning.com> added the comment:
>
>I disagree.  You propose to examine the trees but ignore the forest.
>The perspective programmer needs to understand what is a file.
>

Could you be more specific about what parts of my comments you 
disagree with? The current documentation leaves open the possibility 
of someone thinking that random access doesn't apply to text files, 
getting errors when entering the apparently legal, but in reality 
not, 'b', and that '+', 't+', and 'b+' are legal whereas they require 
a r, w, or a.

I know this bit of documentation has been stable for years, but in 
doing some writing I got tripped up by trying to write an example 
using just '+', despite being very knowledgeable about Python. At 
that pointI experimented with the various combinations and compared 
the reality against the documentation. What I ended up doing is 
splitting the table in two and listing the + combinations explicitly:
Text or Binary:
t       text
b       binary

Read, Write, or Append:
r       beginning, read
w       beginning, write
a       end, write
r+      beginning, read/write
w+      beginning, read/write
a+      end, read/write

-- 

         --- Mitchell

Added file: http://bugs.python.org/file12864/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5061>
_______________________________________
<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [issue5061] Inadequate documentation of the
built-in f</title></head><body>
<blockquote type="cite" cite>David W. Lambert
&lt;lamber...@corning.com&gt; added the comment:<br>
<br>
I disagree.&nbsp; You propose to examine the trees but ignore the
forest. </blockquote>
<blockquote type="cite" cite>The perspective programmer needs to
understand what is a file.</blockquote>
<blockquote type="cite" cite><br></blockquote>
<div><br></div>
<div>Could you be more specific about what parts of my comments you
disagree with? The current documentation leaves open the possibility
of someone thinking that random access doesn't apply to text files,
getting errors when entering the apparently legal, but in reality not,
'b', and that '+', 't+', and 'b+' are legal whereas they require a r,
w, or a.</div>
<div><br></div>
<div>I know this bit of documentation has been stable for years, but
in doing some writing I got tripped up by trying to write an example
using just '+', despite being very knowledgeable about Python. At that
pointI experimented with the various combinations and compared the
reality against the documentation. What I ended up doing is splitting
the table in two and listing the + combinations explicitly:</div>
<blockquote>Text or Binary:
<blockquote>t<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>text</blockquote>
<blockquote>b<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>binary</blockquote>
<blockquote><br></blockquote>
</blockquote>
<blockquote>Read, Write, or Append:
<blockquote>r<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>beginning, read</blockquote>
<blockquote>w<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>beginning, write</blockquote>
<blockquote>a<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>end,
write</blockquote>
<blockquote>r+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>beginning,
read/write</blockquote>
<blockquote>w+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>beginning,
read/write</blockquote>
<blockquote>a+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>end,
read/write</blockquote>
</blockquote>
<div><br></div>
<div><br></div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --- Mitchell</div>
</body>
</html>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to