[Csv] Status
Skip Montanaro
skip at pobox.com
Thu Jan 30 07:08:02 CET 2003
Andrew> We probably should be focusing on refining the PEP and writing
Andrew> some tests at this stage... 8-)
That sounds like a good idea.
Andrew> Regarding the PEP -
Andrew> - are we going to retain the ability to pass keyword arguments,
Andrew> that override the dialect, to the factory functions (the pep
Andrew> doesn't mention this)?
Yes, I thought that was the plan. The current text under Module Interface
gives an incomplete function prototype:
reader(fileobj [, dialect='excel2000'])
but in the text below it says:
The optional dialect parameter is discussed below. It also accepts
several keyword parameters which define specific format settings (see
the section "Formatting Parameters").
I'd like not to enumerate all the possible keyword parameters, especially
since that list may grow. How should I write the synopsis?
reader(fileobj [, dialect='excel2000'] [, keyword parameters])
?
Andrew> - we could make the dialect parameter accept either a string
Andrew> dialect name or a dialect instance - is this a good idea?
It can pretty easily do both. Perhaps we should present the pros and cons
in the PEP and see what kind of feedback we get.
Andrew> - regarding the dialect list function - this probably should be
Andrew> called list_dialects(), yes?
Where do you see dialect_list()? Maybe I need to cvs up. In any case, I
like list_dialects() better.
Andrew> - should we call the delimiter parameter "field_sep" instead (I
Andrew> notice you haven't used underscores in the parameter names -
Andrew> is this deliberate)?
I don't have a big preference one way or the other. I've been calling it
"delimiter" though.
Andrew> Thinking about the tests, I envisage a bunch of tests for the
Andrew> underlying C module, and tests for each dialect (just the basic
Andrew> dialect with no additional parameters)?
Give me one test you'd like to run and one set of inputs and expected
outputs. I'll set up a module tomorrow which should just drop into
Lib/test. I'm kind of running out of steam. (It's Thursday 12:07am here.)
Skip
More information about the Csv
mailing list