Hello,
I have an if-elif chain in which I'd like to match a string against
several regular expressions. Also I'd like to use the match groups
within the respective elif... block. The C-like idiom that I would
like to use is this:
if (match = my_re1.match(line):
# use match
elsif (match = my_re2
Hello all,
(sorry for posting from Google. I currently don't have access to my
normal nntp account.)
Here's my question: Given a list of onknown length, I'd like to be
able to do the following:
(a, b, c, d, e, f) = list
If the list has fewer items than the tuple, I'd like the remaining
tuple el
Hello,
I'd like to have control characters in a string to be converted to
their backslash-escaped counterparts. I looked in the encoders section
of the string module but couldn't find anything appropriate. I could
write it myself but I'm sure something of the sort exists. The
hypothetical method "
On Feb 8, 12:28 pm, Chris Rebert wrote:
> print a.encode("string-escape")
How could I miss that? I was on that doc page already. Should have
typed "/escape" in the browser ;-)
Thanks,
robert
--
http://mail.python.org/mailman/listinfo/python-list