[New-bugs-announce] [issue30432] FileInput doesn't accept PathLike objects for file names

Roy Williams report at bugs.python.org
Mon May 22 14:51:08 EDT 2017


New submission from Roy Williams:

```
from fileinput import FileInput
from pathlib import Path

p = Path('.')
FileInput(p)
```

Results in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/fileinput.py", line 198, in __init__
    files = tuple(files)
TypeError: 'PosixPath' object is not iterable

----------
components: IO
messages: 294169
nosy: Roy Williams
priority: normal
severity: normal
status: open
title: FileInput doesn't accept PathLike objects for file names
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30432>
_______________________________________


More information about the New-bugs-announce mailing list