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 samwyse
Recipients samwyse
Date 2018-03-27.16:17:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522167429.73.0.467229070634.issue33158@psf.upfronthosting.co.za>
In-reply-to
Content
Many objects have properties that allow access to the arguments used to create them.  In particular, file objects have a name property that returns the name used when opening a file.  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.  Adopting this enhancement would also provide consistency with the dialect constructer argument, which is available as an object property.

Changing the fileobj while the csv object is in use would open a can of worms, so this should be a read-only property.

Optionally, the fileobj property could be reflected in the DictReader and DictWriter classes, but the value would be accessible via the .reader and .writer properties of those classes.
History
Date User Action Args
2018-03-27 16:17:09samwysesetrecipients: + samwyse
2018-03-27 16:17:09samwysesetmessageid: <1522167429.73.0.467229070634.issue33158@psf.upfronthosting.co.za>
2018-03-27 16:17:09samwyselinkissue33158 messages
2018-03-27 16:17:09samwysecreate