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
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
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
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" }
#
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