| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
field names in its exception message if you try to write a record with
a dictionary containing fields not in the CSV field names list.
|
|
|
|
|
|
|
|
| |
returning 'a' as the delimiter. It now returns '|', but not because I
understood better what the code was supposed to do. Would someone that
understands the idea behind _guess_delimiter() (see its doc string) look to
see if my fallback choice is better than before or if it's just serendipity
that I picked the proper delimiter?
|
|
|
|
|
|
| |
last field was empty it would strip the delimiter and incorrectly guess that
"" was the delimiter. Reported in c.l.py by Laurent Laporte. Will
backport.
|
|
|
|
| |
gets).
|
|
|
|
|
|
|
| |
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
|
|
|
|
| |
dialect type (which has a better idea of what is and isn't valid).
|
|
|
|
|
| |
implementation features better error reporting, and better compliance
with the PEP.
|
| |
|
|
|
|
|
|
|
|
|
| |
is None, the next row read is used as the fieldnames. In the common case,
this means the programmer doesn't need to know the fieldnames ahead of time.
The first row of the file will be used. In the uncommon case, this means
the programmer can set the reader's fieldnames attribute to None at any time
and have the next row read as the next set of fieldnames, so a csv file can
contain several "sections", each with different fieldnames.
|
|
|
|
| |
will backport.
|
|
|
|
| |
figure out what the code is doing
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminates the eval() step in the csv module resulting in better
security, more clarity, and a little speed.
The idea is to make successive attempts to coerce the string to
a python type:
int(s), long(s), float(s), etc.
As a by-product, eliminates a bare 'except' statement.
|
|
|
|
|
| |
* Add optional delimiters arg to Sniffer.sniff() which restricts the set of
candidate field delimiters.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
due to using a single module-level namespace where multiple namespaces
were used before.
There *really* need to be tests for the sniffer stuff. This could
have been avoided.
Skip, please review, and add sniffer tests!
|
|
|