[Csv] Status
Andrew McNamara
andrewm at object-craft.com.au
Thu Jan 30 08:24:57 CET 2003
> 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.
Just checking... 8-)
>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])
>
>?
Maybe make it "optional keyword parameters"... implied, I know, but...
> 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.
Sometimes you can give people too much choice. We don't have time for
an endless discussion. If we don't think we're going to be crucified,
we should just pick something that's tasteful. Dave?
> 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.
Ah - I mean "dialect list function" in the generic sense - we need one,
and I was proposing to call it list_dialects, or maybe that should be
listdialects to be like listdir... nah, looks ugly.
> 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.
Is there any precident in the other modules? Our module called it
field_sep, and I noticed you called it that in the description.
> 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.)
I might be able to work it out myself... we'll see.
--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
More information about the Csv
mailing list