[issue40013] CSV DictReader parameter documentation

2020-03-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:


New changeset e5527f0edf7edc98e5e859b5fe823878684b4b6a by Miss Islington (bot) 
in branch '3.7':
bpo-40013: Clarify documentation of restval in csv.DictReader (GH-19099) 
(GH-19142)
https://github.com/python/cpython/commit/e5527f0edf7edc98e5e859b5fe823878684b4b6a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:


New changeset 2227c1a4ca87034ed9eac55eb260a5fb0a04375d by Miss Islington (bot) 
in branch '3.8':
bpo-40013: Clarify documentation of restval in csv.DictReader (GH-19099) 
(GH-19141)
https://github.com/python/cpython/commit/2227c1a4ca87034ed9eac55eb260a5fb0a04375d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +18502
pull_request: https://github.com/python/cpython/pull/19141

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18503
pull_request: https://github.com/python/cpython/pull/19142

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-24 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:


New changeset 4b3252cb764807fdb3a661b458d43e4af55cf4df by Juhana Jauhiainen in 
branch 'master':
bpo-40013: Clarify documentation of restval in csv.DictReader (GH-19099)
https://github.com/python/cpython/commit/4b3252cb764807fdb3a661b458d43e4af55cf4df


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-21 Thread Juhana Jauhiainen


Change by Juhana Jauhiainen :


--
keywords: +patch
nosy: +Juhana.Jauhiainen
nosy_count: 3.0 -> 4.0
pull_requests: +18459
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19099

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This looks like a good clarification to me where None is clarified that it's 
the value of restval. DictWriter has a similar doc "The optional restval 
parameter specifies the value to be written if the dictionary is missing a key 
in fieldnames" at https://docs.python.org/3/library/csv.html#csv.DictWriter

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40013] CSV DictReader parameter documentation

2020-03-19 Thread Moshe Sambol


New submission from Moshe Sambol :

The csv.DictReader constructor takes two optional parameters, restkey and 
restval. restkey is documented well, but restval is not:

"If a row has more fields than fieldnames, the remaining data is put in a list 
and stored with the fieldname specified by restkey (which defaults to None). If 
a non-blank row has fewer fields than fieldnames, the missing values are 
filled-in with None."

Since restval is not mentioned here, the reader may assume that the next 
sentence applies to it:

"All other optional or keyword arguments are passed to the underlying reader 
instance."

But this is not the case for restval.

I suggest that the text be amended to 

"If a non-blank row has fewer fields than fieldnames, the missing values are 
filled-in with the value of restval (which defaults to None)."

--
assignee: docs@python
components: Documentation
messages: 364598
nosy: Moshe Sambol, docs@python
priority: normal
severity: normal
status: open
title: CSV DictReader parameter documentation
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com