[New-bugs-announce] [issue38497] Wrong argument name in documentation for pipes.Template.open

Ilaï report at bugs.python.org
Wed Oct 16 04:13:45 EDT 2019


New submission from Ilaï <ilaideutel at gmail.com>:

Documentation for the pipes module indicates that the second argument of open()
is "mode", but it is actually "rw".

Python 3.7.4 (default, Oct  4 2019, 06:57:26)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pipes import Template; Template().open('/tmp/f', mode='r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: open() got an unexpected keyword argument 'mode'

Python 2.7.16 (default, Mar 11 2019, 18:59:25)
[GCC 8.2.1 20181127] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pipes import Template; Template().open('/tmp/f', mode='r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: open() got an unexpected keyword argument 'mode'

https://docs.python.org/3/library/pipes.html#pipes.Template.open

----------
assignee: docs at python
components: Documentation
messages: 354781
nosy: docs at python, ilai
priority: normal
severity: normal
status: open
title: Wrong argument name in documentation for pipes.Template.open
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38497>
_______________________________________


More information about the New-bugs-announce mailing list