Alan G Isaac wrote:
On 8/13/2009 7:58 AM John Machin apparently wrote:
Duck typing: ask a silly question, get a silly answer.
Maybe if you learned to be a more generous reader,
fewer questions would look "silly" to you.
If you take a look at the crap that John very patiently wades through on
> On Aug 13, 1:15 pm, Alan G Isaac wrote:
>> I do not understand the reason for your silly, sarcastic response.
On 8/13/2009 7:58 AM John Machin apparently wrote:
> Duck typing: ask a silly question, get a silly answer.
Maybe if you learned to be a more generous reader,
fewer questions would lo
On Wed, Aug 12, 2009 at 4:45 PM, Alan G Isaac wrote:
> Given a csv.DictWriter instance `dw`
> I think it would be nice to be able to
> say dw.write_header()
> instead of
> dw.writer.writerow(dw.fieldnames)
>
> Good idea?
Maybe. You could file a bug: http://bugs.python.org/
Cheers,
Chris
--
http:
dnames)
>
> >> Good idea?
>
> On 8/12/2009 10:24 PM John Machin apparently wrote:
>
> > Yes, it's a brilliant idea. All you have to do is insert the following
> > lines in your code after importing csv:
>
> > csv.DictWriter.write_header = (
> >
hin apparently wrote:
> Yes, it's a brilliant idea. All you have to do is insert the following
> lines in your code after importing csv:
>
> csv.DictWriter.write_header = (
> lambda dw: dw.writer.writerow(dw.fieldnames)
> )
I do not understand the reason for your silly
he following
lines in your code after importing csv:
csv.DictWriter.write_header = (
lambda dw: dw.writer.writerow(dw.fieldnames)
)
--
http://mail.python.org/mailman/listinfo/python-list
Given a csv.DictWriter instance `dw`
I think it would be nice to be able to
say dw.write_header()
instead of
dw.writer.writerow(dw.fieldnames)
Good idea?
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list