[h5py] 07/38: Add File opening modes to docstring.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:21:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository h5py.

commit 15d13b23d04bf251376c28f2e4cc2190aa871a22
Author: Antony Lee <anntzer.lee at gmail.com>
Date:   Wed Apr 15 13:42:25 2015 -0700

    Add File opening modes to docstring.
---
 h5py/_hl/files.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/h5py/_hl/files.py b/h5py/_hl/files.py
index 515d0f8..5779ae6 100644
--- a/h5py/_hl/files.py
+++ b/h5py/_hl/files.py
@@ -218,7 +218,7 @@ class File(Group):
             else:
                 raise ValueError("It is not possible to forcibly swith SWMR mode off.")
 
-    def __init__(self, name, mode=None, driver=None, 
+    def __init__(self, name, mode=None, driver=None,
                  libver=None, userblock_size=None, swmr=False, **kwds):
         """Create a new file object.
 
@@ -227,6 +227,12 @@ class File(Group):
         name
             Name of the file on disk.  Note: for files created with the 'core'
             driver, HDF5 still requires this be non-empty.
+        mode
+            r        Readonly, file must exist
+            r+       Read/write, file must exist
+            w        Create file, truncate if exists
+            w- or x  Create file, fail if exists
+            a        Read/write if exists, create otherwise (default)
         driver
             Name of the driver to use.  Legal values are None (default,
             recommended), 'core', 'sec2', 'stdio', 'mpio'.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list