Skip to content

Commit f17476b

Browse files
Berthin TorresBerthin Torres
authored andcommitted
add documentation
1 parent 50ca1d0 commit f17476b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/netrc.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ the Unix :program:`ftp` program and other FTP clients.
1818
.. class:: netrc([file])
1919

2020
A :class:`~netrc.netrc` instance or subclass instance encapsulates data from a netrc
21-
file. The initialization argument, if present, specifies the file to parse. If
22-
no argument is given, the file :file:`.netrc` in the user's home directory --
23-
as determined by :func:`os.path.expanduser` -- will be read. Otherwise,
21+
file. The initialization argument, if present, specifies the file to parse. If no
22+
argument is given, it will look for the file path in the `NETRC` environment variable.
23+
If that is not set, it defaults to reading the file :file:`.netrc` in the user's home
24+
directory -- as determined by :func:`os.path.expanduser`. If the file cannot be found,
2425
a :exc:`FileNotFoundError` exception will be raised.
2526
Parse errors will raise :exc:`NetrcParseError` with diagnostic
2627
information including the file name, line number, and terminating token.

0 commit comments

Comments
 (0)