[issue20004] csv.DictReader classic class has a property with setter

2016-08-08 Thread R. David Murray
R. David Murray added the comment: I don't believe it was ever committed to 3.x, nor do I see it there. -- ___ Python tracker ___

[issue20004] csv.DictReader classic class has a property with setter

2016-08-08 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Yeah, it turned out I was actually browsing Python 2.7 sources. My bad. 2016-08-08 16:39 GMT+02:00 R. David Murray : > > R. David Murray added the comment: > > I don't believe it was ever committed to 3.x, nor do I see it there. > >

[issue20004] csv.DictReader classic class has a property with setter

2016-08-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: The comment is still present in python 3 sources at the moment. Shouldn't we remove it in python 3 ? -- nosy: +deronnax ___ Python tracker

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Peter Otten
New submission from Peter Otten: I ran into this when trying to trigger rereading the column names with $ cat tmp.csv alpha,beta 1,2 gamma,delta,epsilon 3,4,5 $ python Python 2.7.2+ (default, Jul 20 2012, 22:15:08) [GCC 4.6.1] on linux2 Type help, copyright, credits or license for more

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not clear on this: is this a new feature you'd like to see, or is this documented behavior of a DictReader that's not working? If it's a new feature, the earliest it can be implemented is in 3.5. -- nosy: +eric.smith

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread R. David Murray
R. David Murray added the comment: Although this is clearly a bug, we've run into backward compatibility issues in the past with promoting stdlib classic classes to new style, so I'm not sure if the risk of fixing it is worth the benefit. It is obviously not a problem in Python3. Eric: I

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: My (poorly phrased) question really was: is resetting fieldnames documented to force a re-read of the column headers? I don't see that it is, so I'm going to call this a 3.5 enhancement request. I agree with David that we can't change DictReader to inherit

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Peter Otten
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

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread R. David Murray
R. David Murray added the comment: Here is a proposed comment wording. -- keywords: +patch Added file: http://bugs.python.org/file33181/csv_dictread_setter_comment.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20004

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread R. David Murray
R. David Murray added the comment: Since it isn't easy to figure out that setting fieldnames to None would do anything useful without looking at the code, I'd say a code comment would be appropriate. The exception would be someone backporting code from python3, but I think we'll just quietly

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread Peter Otten
Peter Otten added the comment: The proposed patch looks fine to me. And for the record, I don't think setting fieldnames should be promoted in the 3.x documentation. Along the lines of Eric's suggestion I should have written something like import csv with open(tmp.csv) as f: ... for i

[issue20004] csv.DictReader classic class has a property with setter

2013-12-17 Thread R. David Murray
R. David Murray added the comment: Committed. Thanks, Peter. -- resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20004