Issue 6723: csv.writer: example does not work (original) (raw)
Issue6723
Created on 2009-08-18 12:38 by nicolasg, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg91682 - (view) | Author: Nicolas Goutte (nicolasg) | Date: 2009-08-18 12:38 |
In the documentation for csv.writer, the example spamWriter = csv.writer(open('eggs.csv', 'w'), delimiter=' ', quotechar='|', quoting=QUOTE_MINIMAL) does not work, as Python complains about "SyntaxError: invalid syntax", as QUOTE_MINIMAL is not a global identifier. By replacing QUOTE_MINIMAL by csv.QUOTE_MINIMAL there is no syntax error anymore. I have discovered the issue with python 2.6.2. All online documentation version (2.6, 2.7, 3.1, 3.2) seem to have the same documentation (e.g. http://docs.python.org/library/csv.html ) | ||
msg91691 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2009-08-18 14:41 |
Thanks for the report. Fixed for 2.6, 2.7, 3.0, 3.2. Can't seem to check out a 3.1 branch (tried release31-maint but was rebuffed by svn). | ||
msg91693 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2009-08-18 14:43 |
figured out my checkout problem. will have 3.1 fixed shortly. | ||
msg91694 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2009-08-18 14:47 |
3.1 corrected as well. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:52 | admin | set | github: 50972 |
2009-08-18 14:47:24 | skip.montanaro | set | status: open -> closedresolution: fixedmessages: + |
2009-08-18 14:43:57 | skip.montanaro | set | assignee: georg.brandl -> skip.montanaromessages: + |
2009-08-18 14:41:10 | skip.montanaro | set | nosy: + skip.montanaromessages: + |
2009-08-18 12:38:33 | nicolasg | create |