Bugs item #1108060, was opened at 2005-01-24 13:09 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1108060&group_id=5470
Category: Documentation Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Andrew Bennetts (spiv) Assigned to: Nobody/Anonymous (nobody) Summary: "\0" not listed as a valid escape in the lang reference Initial Comment: According to table in http://docs.python.org/ref/strings.html, the list of valid escape sequences in strings does not include \0. It appears that the parser actually allows \n for values of n in the range 0-7, but this is not documented. Many people with exposure to C expect \0 to be valid (and it does work, after all!). A quick grep on my system finds many libraries use \0 in string literals, including: - Twisted - HTMLgen - PIL - numarray - Reportlab - and of course the standard library: tarfile, gzip, pystone, binhex, and others. I suggest the documentation be updated to officially support \0 as a valid escape. I don't care as much about \1 through to \7... I was surprised they worked (and then surprised that \8 and \9 didn't), and I think they might as well be deprecated, but I don't care much either way. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1108060&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com