(path_names, encoding)
| 61 | |
| 62 | |
| 63 | def _get_encoding_arg(path_names, encoding): |
| 64 | # For compatibility with versions where *encoding* was a positional |
| 65 | # argument, it needs to be given explicitly when there are multiple |
| 66 | # *path_names*. |
| 67 | # This limitation can be removed in Python 3.15. |
| 68 | if encoding is _MISSING: |
| 69 | if len(path_names) > 1: |
| 70 | raise TypeError( |
| 71 | "'encoding' argument required with multiple path names", |
| 72 | ) |
| 73 | else: |
| 74 | return 'utf-8' |
| 75 | return encoding |
| 76 | |
| 77 | |
| 78 | def _get_resource(anchor, path_names): |