You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2019-10-16.08:13:45.086>labels= ['3.11', 'type-bug', '3.9', '3.10', 'docs']
title='[doc] Wrong argument name in documentation for pipes.Template.open'updated_at=<Date2021-11-27.00:44:38.748>user='https://github.com/ilai-deutel'
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'
Semantically mode makes sense to me though rw is correct and Template.open docstring has rw. There are docs like unittest where the keyword arguments are slightly different from the actual keyword arguments in the assert helpers. I guess it's slightly unfortunate that Template.open got rw as keyword argument while open uses mode as keyword argument.
iritkatriel
changed the title
Wrong argument name in documentation for pipes.Template.open
[doc] Wrong argument name in documentation for pipes.Template.open
Nov 27, 2021
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: