@@ -155,8 +155,10 @@ UTF-8 encoded string. See :ref:`Configuration Options <pyinitconfig-opts>`.
155155 * Set *\* value *, and return ``0 `` on success.
156156 * Set an error in *config * and return ``-1 `` on error.
157157
158- *\* value * can be set to ``NULL `` if the option is an optional string and the
159- option is unset.
158+ *\* value * can be set to ``NULL `` if the option is unset or if the option is
159+ an optional string.
160+ Optional strings are documented with the type ``str | None `` in the
161+ :ref: `Configuration Options <pyinitconfig-opts >` table.
160162
161163 On success, the string must be released with ``free(value) `` if it's not
162164 ``NULL ``.
@@ -204,6 +206,9 @@ only implemented when ``Py_InitializeFromInitConfig()`` is called, not by the
204206 Set a string configuration option from a null-terminated UTF-8
205207 encoded string. The string is copied.
206208
209+ Options documented with the type ``str | None `` in the :ref: `Configuration
210+ Options <pyinitconfig-opts>` table can be set to ``NULL ``.
211+
207212 * Return ``0 `` on success.
208213 * Set an error in *config * and return ``-1 `` on error.
209214
@@ -275,15 +280,15 @@ Configuration Options
275280 - Public
276281 * - ``"base_exec_prefix" ``
277282 - :c:member: `base_exec_prefix <PyConfig.base_exec_prefix> `
278- - ``str ``
283+ - ``str | None ``
279284 - Public
280285 * - ``"base_executable" ``
281286 - :c:member: `base_executable <PyConfig.base_executable> `
282- - ``str ``
287+ - ``str | None ``
283288 - Public
284289 * - ``"base_prefix" ``
285290 - :c:member: `base_prefix <PyConfig.base_prefix> `
286- - ``str ``
291+ - ``str | None ``
287292 - Public
288293 * - ``"buffered_stdio" ``
289294 - :c:member: `buffered_stdio <PyConfig.buffered_stdio> `
@@ -331,15 +336,15 @@ Configuration Options
331336 - Read-only
332337 * - ``"dump_refs_file" ``
333338 - :c:member: `dump_refs_file <PyConfig.dump_refs_file> `
334- - ``str ``
339+ - ``str | None ``
335340 - Read-only
336341 * - ``"exec_prefix" ``
337342 - :c:member: `exec_prefix <PyConfig.exec_prefix> `
338- - ``str ``
343+ - ``str | None ``
339344 - Public
340345 * - ``"executable" ``
341346 - :c:member: `executable <PyConfig.executable> `
342- - ``str ``
347+ - ``str | None ``
343348 - Public
344349 * - ``"faulthandler" ``
345350 - :c:member: `faulthandler <PyConfig.faulthandler> `
@@ -359,7 +364,7 @@ Configuration Options
359364 - Read-only
360365 * - ``"home" ``
361366 - :c:member: `home <PyConfig.home> `
362- - ``str ``
367+ - ``str | None ``
363368 - Read-only
364369 * - ``"import_time" ``
365370 - :c:member: `import_time <PyConfig.import_time> `
@@ -431,35 +436,35 @@ Configuration Options
431436 - Public
432437 * - ``"prefix" ``
433438 - :c:member: `prefix <PyConfig.prefix> `
434- - ``str ``
439+ - ``str | None ``
435440 - Public
436441 * - ``"program_name" ``
437442 - :c:member: `program_name <PyConfig.program_name> `
438443 - ``str ``
439444 - Read-only
440445 * - ``"pycache_prefix" ``
441446 - :c:member: `pycache_prefix <PyConfig.pycache_prefix> `
442- - ``str ``
447+ - ``str | None ``
443448 - Public
444449 * - ``"quiet" ``
445450 - :c:member: `quiet <PyConfig.quiet> `
446451 - ``bool ``
447452 - Public
448453 * - ``"run_command" ``
449454 - :c:member: `run_command <PyConfig.run_command> `
450- - ``str ``
455+ - ``str | None ``
451456 - Read-only
452457 * - ``"run_filename" ``
453458 - :c:member: `run_filename <PyConfig.run_filename> `
454- - ``str ``
459+ - ``str | None ``
455460 - Read-only
456461 * - ``"run_module" ``
457462 - :c:member: `run_module <PyConfig.run_module> `
458- - ``str ``
463+ - ``str | None ``
459464 - Read-only
460465 * - ``"run_presite" ``
461466 - :c:member: `run_presite <PyConfig.run_presite> `
462- - ``str ``
467+ - ``str | None ``
463468 - Read-only
464469 * - ``"safe_path" ``
465470 - :c:member: `safe_path <PyConfig.safe_path> `
@@ -479,15 +484,15 @@ Configuration Options
479484 - Read-only
480485 * - ``"stdio_encoding" ``
481486 - :c:member: `stdio_encoding <PyConfig.stdio_encoding> `
482- - ``str ``
487+ - ``str | None ``
483488 - Read-only
484489 * - ``"stdio_errors" ``
485490 - :c:member: `stdio_errors <PyConfig.stdio_errors> `
486491 - ``str ``
487492 - Read-only
488493 * - ``"stdlib_dir" ``
489494 - :c:member: `stdlib_dir <PyConfig.stdlib_dir> `
490- - ``str ``
495+ - ``str | None ``
491496 - Public
492497 * - ``"tracemalloc" ``
493498 - :c:member: `tracemalloc <PyConfig.tracemalloc> `
@@ -542,6 +547,9 @@ Configuration Options
542547 - ``bool ``
543548 - Read-only
544549
550+ The type ``str | None `` means that the option is an optional string which can
551+ be set to ``NULL ``.
552+
545553Visibility:
546554
547555* Public: Can be retrieved by :c:func: `PyConfig_Get ` and set by
0 commit comments