Peter Otten added the comment: Setting the fieldnames attribute of an existing DictReader is not documented. Eric, there is no need for an enhancement (other than for the documentation) as this already works in Python 3 where newstyle classes are the default. The heart of the bug is really the classic class with a property.
I have no idea what a fix could look like that is less intrusive than promoting DictReader to a newstyle class. Maybe it would be sufficient to add a comment to the code pointing to my bug report? I've already shown one workaround (object as a mixin); another would be to set the private _fieldnames rather than fieldnames so that the getter will continue to work as designed. Looking at the current DictReader code and determining why and how it fails will be quite hard for a non-expert ;) ---------- _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue20004> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
