Duncan Booth wrote
> Ross Boylan wrote:
>
> > As an extension or alternate, could there be a decorator like
> > @source_line(lineno, filename)
> > for classes and methods that could do the c
s and methods that could do the conversion on the fly? I
don't know if there's a way to go from the function (or class) object
the decorator receives to the AST.
Comments?
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
rs waiting on the
condition, not one with notify() and a single thread waiting (which is
what I'm thinking about). The thread does say there is no return value;
it seems to me it would be useful to document that if it's still true
(or True :).
Can anyone help me understand w
On Tue, 2012-01-24 at 13:54 -0800, Ross Boylan wrote:
> Is it safe to use unittest with threads?
>
> In particular, if a unit test fails in some thread other than the one
> that launched the test, will that information be captured properly?
>
> A search of the net shows a s
find anything definitive.
If it matters, I'm using CPython 2.7.
Thanks. If you're using email, I'd appreciate a cc.
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2011-10-26 at 12:48 -0700, Ross Boylan wrote:
> I want to replace every \ and " (the two characters for backslash and
> double quotes) with a \ and the same character, i.e.,
> \ -> \\
> " -> \"
I'd like to thank Ian, Dave, MRAB, and John for their he
sub(r"([\\\"])", "\1", 'Silly " quote')
'Silly \\\x01 quote'
>>> re.sub(r"([\\\"])", "\\1", 'Silly " quote')
'Silly \\" quote'
Or perhaps I'm confused about what the displayed results mean. If a
string has a literal \, does it get shown as \\?
I'd appreciate it if you cc me on the reply.
Thanks.
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
cs of the pipes for the processes standard
file handles. Do they need to be closed (judging from the examples,
no)? When reads/writes to them return, and what state is the stream in
at the time?
Thanks for any wisdom you can offer.
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
parent would get each logged event right away. However,
logging.getLogger("a").error("test")
produces only a single log message indicating an associated object of "a".
The docs lead me to expect that I'd see one message from "a" and
another from root.