[Csv] Minor change to behaviour of csv module

Magnus Lie Hetland magnus at hetland.org
Fri Jan 7 14:38:17 CET 2005


Andrew McNamara <andrewm at object-craft.com.au>:
>
[snip]
> Currently, with a non-default escapechar='\\', input like:
> 
>     field one,field \
>     two,field three
> 
> Returns:
> 
>     ["field one", "field \\\ntwo", "field three"]
> 
> In the 2.5 series, I propose changing this to return:
> 
>     ["field one", "field \ntwo", "field three"]

IMO this is the *only* reasonable behaviour. I don't understand why
the escape character should be left in; this is one of the reason why
UNIX-style colon-separated values don't work with the current module.

If one wanted the first version, one would (I presume) write

   field one,field \\\
   two,field three

-- 
Magnus Lie Hetland       Fallen flower I see / Returning to its branch
http://hetland.org       Ah! a butterfly.           [Arakida Moritake]


More information about the Csv mailing list