Visitar URL original
bpo-44136: pathlib: merge `_Flavour.is_reserved()` into `PurePath.is_reserved()` by barneygale · Pull Request #30321 · python/cpython · GitHub
Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Lib/pathlib.py
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
  • Loading branch information
barneygale and arhadthedev authored Jan 1, 2022
commit a2baccf336ad328c7732ebdb1c90de8259ffeb4b
4 changes: 2 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

_WIN_RESERVED_NAMES = (
{'CON', 'PRN', 'AUX', 'NUL', 'CONIN$', 'CONOUT$'} |
{'COM%s' % c for c in '123456789\xb9\xb2\xb3'} |
{'LPT%s' % c for c in '123456789\xb9\xb2\xb3'}
{f'COM{c}' for c in '123456789\xb9\xb2\xb3'} |
{f'LPT{c}' for c in '123456789\xb9\xb2\xb3'}
)

def _ignore_error(exception):
Expand Down