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

Method from_file

Lib/zoneinfo/_zoneinfo.py:82–92  ·  view source on GitHub ↗
(cls, file_obj, /, key=None)

Source from the content-addressed store, hash-verified

80
81 @classmethod
82 def from_file(cls, file_obj, /, key=None):
83 obj = super().__new__(cls)
84 obj._key = key
85 obj._file_path = None
86 obj._load_file(file_obj)
87 obj._file_repr = repr(file_obj)
88
89 # Disable pickling for objects created from files
90 obj.__reduce__ = obj._file_reduce
91
92 return obj
93
94 @classmethod
95 def clear_cache(cls, *, only_keys=None):

Callers

nothing calls this directly

Calls 3

superClass · 0.85
_load_fileMethod · 0.80
__new__Method · 0.45

Tested by

no test coverage detected