File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -132,12 +132,13 @@ High-level Module Interface
132
132
Opens the provided file with mode ``'rb' ``. This function should be used
133
133
when the intent is to treat the contents as executable code.
134
134
135
- ``path `` should be an absolute path.
135
+ ``path `` should be a :class: ` str ` and an absolute path.
136
136
137
137
The behavior of this function may be overridden by an earlier call to the
138
- :c:func: `PyFile_SetOpenCodeHook `, however, it should always be considered
139
- interchangeable with ``open(path, 'rb') ``. Overriding the behavior is
140
- intended for additional validation or preprocessing of the file.
138
+ :c:func: `PyFile_SetOpenCodeHook `. However, assuming that ``path `` is a
139
+ :class: `str ` and an absolute path, ``open_code(path) `` should always behave
140
+ the same as ``open(path, 'rb') ``. Overriding the behavior is intended for
141
+ additional validation or preprocessing of the file.
141
142
142
143
.. versionadded :: 3.8
143
144
You can’t perform that action at this time.
0 commit comments