Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32487
| References | <af9tq3FnmkaU1@mid.dfncis.de> <mailman.3087.1351600438.27098.python-list@python.org> <afa15qFnmkaU2@mid.dfncis.de> |
|---|---|
| Date | 2012-10-31 00:18 +1100 |
| Subject | Re: exec with partial globals |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3088.1351603139.27098.python-list@python.org> (permalink) |
On Tue, Oct 30, 2012 at 11:57 PM, Helmut Jarausch <jarausch@igpm.rwth-aachen.de> wrote: > Given spreadsheet S (Source) and D (Destination) as objects (wrapping a > dictionary) a possible (legal) input would be > > D.price= D.price-S.discount > > No other fields of 'D' should be modifiable. That's a bit harder. What you're describing, using exec with specific globals, would not be able to do this. You'd need to build a proxy object that decides whether or not to pass on the change. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
exec with partial globals Helmut Jarausch <jarausch@igpm.rwth-aachen.de> - 2012-10-30 12:00 +0000
Re: exec with partial globals Chris Angelico <rosuav@gmail.com> - 2012-10-30 23:28 +1100
Re: exec with partial globals Dave Angel <d@davea.name> - 2012-10-30 08:33 -0400
Re: exec with partial globals Helmut Jarausch <jarausch@igpm.rwth-aachen.de> - 2012-10-30 12:57 +0000
Re: exec with partial globals Chris Angelico <rosuav@gmail.com> - 2012-10-31 00:18 +1100
Re: exec with partial globals Dave Angel <d@davea.name> - 2012-10-30 09:39 -0400
csiph-web