Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104384

exec "x = 3; print x" in a - How does it work?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From "Veek. M" <vek.m1234@gmail.com>
Newsgroups comp.lang.python
Subject exec "x = 3; print x" in a - How does it work?
Date Wed, 09 Mar 2016 10:57:33 +0530
Organization Home
Lines 2
Message-ID <nboc29$up4$1@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
Injection-Date Wed, 9 Mar 2016 05:24:25 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="d79aca86af8f98f0a505cf6aa929e91b"; logging-data="31524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3YhtKvCgxa9jpJkplDzKB"
User-Agent KNode/4.14.1
Cancel-Lock sha1:SWpV/XEWKF2SR+ZIdjztoWEb2vc=
Xref csiph.com comp.lang.python:104384

Show key headers only | View raw


What is the return value of `exec`? Would that object be then used to 
iterate the sequence in 'a'? I'm reading this: 
https://www.python.org/download/releases/2.2.3/descrintro/ 

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

exec "x = 3; print x" in a - How does it work? "Veek. M" <vek.m1234@gmail.com> - 2016-03-09 10:57 +0530
  Re: exec "x = 3; print x" in a - How does it work? Ben Finney <ben+python@benfinney.id.au> - 2016-03-09 16:50 +1100
    Re: exec "x = 3; print x" in a - How does it work? "Veek. M" <vek.m1234@gmail.com> - 2016-03-09 11:51 +0530
  Re: exec "x = 3; print x" in a - How does it work? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-03-09 16:54 +1100
    Re: exec "x = 3; print x" in a - How does it work? "Veek. M" <vek.m1234@gmail.com> - 2016-03-09 11:55 +0530
      Re: exec "x = 3; print x" in a - How does it work? Chris Angelico <rosuav@gmail.com> - 2016-03-09 17:34 +1100

csiph-web