Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86256
| References | <54eb2357$0$3011$426a74cc@news.free.fr> <cl16ncF4a8mU1@mid.individual.net> <8761ascwt4.fsf@elektro.pacujo.net> <mailman.19094.1424716896.18130.python-list@python.org> <87385wh2ho.fsf@elektro.pacujo.net> |
|---|---|
| Date | 2015-02-24 06:17 +1100 |
| Subject | Re: list storing variables |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19096.1424719540.18130.python-list@python.org> (permalink) |
On Tue, Feb 24, 2015 at 6:06 AM, Marko Rauhamaa <marko@pacujo.net> wrote: > What I'm saying is that there's nothing special about Python's object > model or variables. Guido could decide tomorrow to add a C-esque "&" > operator to Python without breaking a single existing Python program. > The Python compiler would simply generate code like above. Actually, there's a fairly huge difference. All you've done is create a thing which can set a global... you don't have any way to pass pointers around, like you can in C. (And that's even without getting into pointer *arithmetic*.) You have to construct a dedicated "thing" in your source code for every pointer you want to be able to work with. And if you try to make a single generic "Ampersand" class, what you'll find is that you're working with namespaces, not addresses. So Python's name-binding model really is fundamentally different from C's stuff-in-memory model. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
list storing variables "ast" <nomail@invalid.com> - 2015-02-23 13:55 +0100
Re: list storing variables Dave Angel <davea@davea.name> - 2015-02-23 08:24 -0500
Re: list storing variables Marko Rauhamaa <marko@pacujo.net> - 2015-02-23 15:49 +0200
Re: list storing variables Peter Pearson <pkpearson@nowhere.invalid> - 2015-02-23 17:35 +0000
Re: list storing variables Marko Rauhamaa <marko@pacujo.net> - 2015-02-23 20:22 +0200
Re: list storing variables Peter Otten <__peter__@web.de> - 2015-02-23 19:41 +0100
Re: list storing variables Marko Rauhamaa <marko@pacujo.net> - 2015-02-23 21:06 +0200
Re: list storing variables Chris Angelico <rosuav@gmail.com> - 2015-02-24 06:17 +1100
Re: list storing variables Marko Rauhamaa <marko@pacujo.net> - 2015-02-23 22:25 +0200
Re: list storing variables Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-23 12:29 -0700
Re: list storing variables Marko Rauhamaa <marko@pacujo.net> - 2015-02-23 22:38 +0200
Re: list storing variables Ben Finney <ben+python@benfinney.id.au> - 2015-02-24 09:03 +1100
Re: list storing variables Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-24 13:24 +1100
Re: list storing variables Marko Rauhamaa <marko@pacujo.net> - 2015-02-24 10:18 +0200
csiph-web