Skip to content

Commit 91a421e

Browse files
committed
update docs
1 parent b97016f commit 91a421e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Doc/library/zipfile.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ The module defines the following items:
8484
formerly protected :attr:`!_compresslevel`. The older protected name
8585
continues to work as a property for backwards compatibility.
8686

87+
88+
.. classmethod:: for_name(filename, archive, *, date_time=None)
89+
90+
Construct an appropriate :class:`ZipInfo` from a *filename*,
91+
a :class:`ZipFile` archive and an optional *date_time*.
92+
93+
If *date_time* is not specified, the current local time is used
94+
instead, namely ``date_time = time.localtime(time.time())[:6]``.
95+
96+
.. versionadded:: 3.14
97+
98+
8799
.. function:: is_zipfile(filename)
88100

89101
Returns ``True`` if *filename* is a valid ZIP file based on its magic number,

0 commit comments

Comments
 (0)