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 serhiy.storchaka
Recipients samwyse, serhiy.storchaka
Date 2018-03-27.17:17:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522171075.57.0.467229070634.issue33158@psf.upfronthosting.co.za>
In-reply-to
Content
> A fileobj property would be convenient, as you otherwise, for example, need to pass an extra argument to routines that need both the csv object and the underlying file object.

But you should already have this object for creating csv.reader() or csv.writer().

Even if keep the argument of the constructor as an instance attribute, there is a problem with naming this attribute. csv.reader works not only with files. It accepts arbitrary iterable.

>>> it = iter(['Spam, Spam, Spam, Spam, Spam, Baked Beans', 'Spam, Lovely Spam, Wonderful Spam'])
>>> list(csv.reader(it))
[['Spam', ' Spam', ' Spam', ' Spam', ' Spam', ' Baked Beans'], ['Spam', ' Lovely Spam', ' Wonderful Spam']]

The dialect property is not a copy of the dialect constructer argument.
History
Date User Action Args
2018-03-27 17:17:55serhiy.storchakasetrecipients: + serhiy.storchaka, samwyse
2018-03-27 17:17:55serhiy.storchakasetmessageid: <1522171075.57.0.467229070634.issue33158@psf.upfronthosting.co.za>
2018-03-27 17:17:55serhiy.storchakalinkissue33158 messages
2018-03-27 17:17:55serhiy.storchakacreate