Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92e3194

Browse files
committed
Deprecate the read() and write() methods.
Don't refer to them from the fromfile() and tofile() methods.
1 parent 26c73b7 commit 92e3194

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

Doc/lib/libarray.tex

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ \section{Built-in Module \sectcode{array}}
8484
available are still inserted into the array. \var{f} must be a real
8585
built-in file object; something else with a \code{read()} method won't
8686
do.
87-
88-
Also available as the \method{read()} method.
8987
\end{funcdesc}
9088

9189
\begin{funcdesc}{fromlist}{list}
@@ -106,14 +104,14 @@ \section{Built-in Module \sectcode{array}}
106104
\end{funcdesc}
107105

108106
\begin{funcdesc}{read}{f\, n}
107+
\deprecated {1.5.1}
108+
{Use the \method{fromfile()} method.}
109109
Read \var{n} items (as machine values) from the file object \var{f}
110110
and append them to the end of the array. If less than \var{n} items
111111
are available, \exception{EOFError} is raised, but the items that were
112112
available are still inserted into the array. \var{f} must be a real
113113
built-in file object; something else with a \method{read()} method won't
114114
do.
115-
116-
Also available as the \method{fromfile()} method.
117115
\end{funcdesc}
118116

119117
\begin{funcdesc}{reverse}{}
@@ -122,8 +120,6 @@ \section{Built-in Module \sectcode{array}}
122120

123121
\begin{funcdesc}{tofile}{f}
124122
Write all items (as machine values) to the file object \var{f}.
125-
126-
Also available as the \function{write()} function.
127123
\end{funcdesc}
128124

129125
\begin{funcdesc}{tolist}{}
@@ -137,9 +133,9 @@ \section{Built-in Module \sectcode{array}}
137133
\end{funcdesc}
138134

139135
\begin{funcdesc}{write}{f}
136+
\deprecated {1.5.1}
137+
{Use the \method{tofile()} method.}
140138
Write all items (as machine values) to the file object \var{f}.
141-
142-
Also available as the \function{write()} function.
143139
\end{funcdesc}
144140

145141
When an array object is printed or converted to a string, it is

Doc/libarray.tex

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ \section{Built-in Module \sectcode{array}}
8484
available are still inserted into the array. \var{f} must be a real
8585
built-in file object; something else with a \code{read()} method won't
8686
do.
87-
88-
Also available as the \method{read()} method.
8987
\end{funcdesc}
9088

9189
\begin{funcdesc}{fromlist}{list}
@@ -106,14 +104,14 @@ \section{Built-in Module \sectcode{array}}
106104
\end{funcdesc}
107105

108106
\begin{funcdesc}{read}{f\, n}
107+
\deprecated {1.5.1}
108+
{Use the \method{fromfile()} method.}
109109
Read \var{n} items (as machine values) from the file object \var{f}
110110
and append them to the end of the array. If less than \var{n} items
111111
are available, \exception{EOFError} is raised, but the items that were
112112
available are still inserted into the array. \var{f} must be a real
113113
built-in file object; something else with a \method{read()} method won't
114114
do.
115-
116-
Also available as the \method{fromfile()} method.
117115
\end{funcdesc}
118116

119117
\begin{funcdesc}{reverse}{}
@@ -122,8 +120,6 @@ \section{Built-in Module \sectcode{array}}
122120

123121
\begin{funcdesc}{tofile}{f}
124122
Write all items (as machine values) to the file object \var{f}.
125-
126-
Also available as the \function{write()} function.
127123
\end{funcdesc}
128124

129125
\begin{funcdesc}{tolist}{}
@@ -137,9 +133,9 @@ \section{Built-in Module \sectcode{array}}
137133
\end{funcdesc}
138134

139135
\begin{funcdesc}{write}{f}
136+
\deprecated {1.5.1}
137+
{Use the \method{tofile()} method.}
140138
Write all items (as machine values) to the file object \var{f}.
141-
142-
Also available as the \function{write()} function.
143139
\end{funcdesc}
144140

145141
When an array object is printed or converted to a string, it is

0 commit comments

Comments
 (0)