MCPcopy Index your code
hub / github.com/python/cpython / setpassword

Method setpassword

Lib/zipfile/__init__.py:1651–1658  ·  view source on GitHub ↗

Set default password for encrypted files.

(self, pwd)

Source from the content-addressed store, hash-verified

1649 return info
1650
1651 def setpassword(self, pwd):
1652 """Set default password for encrypted files."""
1653 if pwd and not isinstance(pwd, bytes):
1654 raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__)
1655 if pwd:
1656 self.pwd = pwd
1657 else:
1658 self.pwd = None
1659
1660 @property
1661 def comment(self):

Callers 4

test_bad_passwordMethod · 0.80
test_good_passwordMethod · 0.80
test_unicode_passwordMethod · 0.80
test_seek_tellMethod · 0.80

Calls

no outgoing calls

Tested by 4

test_bad_passwordMethod · 0.64
test_good_passwordMethod · 0.64
test_unicode_passwordMethod · 0.64
test_seek_tellMethod · 0.64