homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cowlinator
Recipients cowlinator
Date 2018年02月07日.01:51:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation for the csv.DictReader constructor (and presumably csv.DictWriter also) has the wrong name written for the first argument. This prevents the argument from being called by name.
>>> file = open("file.txt", 'a')
>>> csv.DictReader(csvfile=file)
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
TypeError: __init__() takes at least 2 arguments (1 given)
>>> csv.DictReader(f=file)
<csv.DictReader instance at 0x04D97A08>
>>> # how could i have known it was named 'f'?
Please change the documentation.
History
Date User Action Args
2018年02月07日 01:51:05cowlinatorsetrecipients: + cowlinator
2018年02月07日 01:51:05cowlinatorsetmessageid: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za>
2018年02月07日 01:51:05cowlinatorlinkissue32784 messages
2018年02月07日 01:51:04cowlinatorcreate

AltStyle によって変換されたページ (->オリジナル) /