Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-12 Thread Ethan Furman
On 08/10/2015 04:05 PM, ISAAC J SCHWABACHER wrote: I don't know about you, but I sure like this better than what you have: code.putlines(f""" static char {entry.doc_cname}[] = "{ split_string_literal(escape_bytestring(docstr))}"; { # nested! f""" #if CYTHON_COMPILING_IN_CPYTHON struc

[Python-Dev] [low-pri] Changing my email address

2015-08-12 Thread Steve Dower
Hi all Just a heads-up that I'll be switching to an alternate email address for all of my Python communications, due to what I'm sure are very sensible corporate security policies that nonetheless corrupt code snippets and URLs in my incoming email. I will henceforth be known as steve.do...@py

Re: [Python-Dev] About closures creates in exec

2015-08-12 Thread R. David Murray
On Wed, 12 Aug 2015 21:05:50 +0200, Andrea Griffini wrote: > Is it intended that closures created in exec statement/function cannot see > locals if the exec was provided a locals dictionary? > > This code gives an error ("foo" is not found during lambda execution): > > exec("def foo(x): retu

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-12 Thread ISAAC J SCHWABACHER
Ruby already has this feature, and in my experience syntax highlighters handle it just fine. Here's what vim's default highlighter shows me: puts "we can #{ ["include", "interpolate"].each { |s| puts s } .select { |s| s.include? "erp" } #

[Python-Dev] About closures creates in exec

2015-08-12 Thread Andrea Griffini
Is it intended that closures created in exec statement/function cannot see locals if the exec was provided a locals dictionary? This code gives an error ("foo" is not found during lambda execution): exec("def foo(x): return x\n\n(lambda x:foo(x))(0)", globals(), {}) while executes normally w