Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Julian Smith
On Fri, 7 Oct 2022 18:28:06 +0100 Barry wrote: > > On 7 Oct 2022, at 18:16, MRAB wrote: > > > > On 2022-10-07 16:45, Skip Montanaro wrote: > >>> On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames > >>> > >>> wrote: > >>> 1. The culprit was me. As lazy as I am, I have used f-strings all over the

Re: Attaching a live interpreter to a script?

2009-01-13 Thread Julian Smith
On Mon, 12 Jan 2009 23:35:14 -0800 (PST) Kannon neokan...@gmail.com wrote: What I'd like to do is attach an interpreter to a program running from a script (I.E, not something I typed into the live interpreter). It'd be an awesome way to debug programs, as well as tweak parameters and such at

Using the `email' module in a bazaar plugin

2008-12-10 Thread Julian Smith
I don't seem to be able to use the `email' module from within a bazaar plugin. Other modules work ok, e.g. nntplib. Here's my plugin, cut-down to show just the email problem: import sys print 'sys.version', sys.version import nntplib n = nntplib.NNTP( 'jsmith-ubuntu2' ) print n

Re: Using the `email' module in a bazaar plugin

2008-12-10 Thread Julian Smith
On Wed, 10 Dec 2008 12:13:28 + Matt Nordhoff [EMAIL PROTECTED] wrote: Julian Smith wrote: I don't seem to be able to use the `email' module from within a bazaar plugin. Other modules work ok, e.g. nntplib. Here's my plugin, cut-down to show just the email problem: import sys

Re: Creating anonymous functions using eval

2005-08-22 Thread Julian Smith
On 12 Jul 2005 08:28:45 -0700 Devan L [EMAIL PROTECTED] wrote: [ here's some context: I've been playing with a function that creates an anonymous function by compiling a string parameter, and it seems to work pretty well: def fn( text): exec 'def foo' + text.strip()

Creating anonymous functions using eval

2005-07-12 Thread Julian Smith
I've been playing with a function that creates an anonymous function by compiling a string parameter, and it seems to work pretty well: def fn( text): exec 'def foo' + text.strip() return foo This can be used like: def foo( x): print x( 2, 5) foo( fn( '''

Re: Anonymus functions revisited

2005-03-23 Thread Julian Smith
On 23 Mar 2005 08:31:36 GMT Antoon Pardon [EMAIL PROTECTED] wrote: Can someone who thinks this way, please explain why this is acceptable [ x * x for x in some_iterator ] But this is not map(lambda x: x * x, some_iteraror) and should be replaced with def sqr(x): return x * x