Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58380
| References | <46d5788e-f081-48d8-b839-f31a0c95bd21@googlegroups.com> <7266a77b-3404-4974-8364-b0cb50ed45a5@googlegroups.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2013-11-03 01:53 -0700 |
| Subject | Re: zero argument member functions versus properties |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1970.1383468872.18130.python-list@python.org> (permalink) |
On Sun, Nov 3, 2013 at 1:06 AM, Peter Cacioppi <peter.cacioppi@gmail.com> wrote: > Actually C# is mature enough for this idiom. C# and Python both support getter/setter methods that present as direct attribute access to client code, and thus allow you to refactor the class without breaking backwards compatibility. It's not as clear-cut as it looks in C#. Although refactoring the class in this way doesn't change the API, it does break ABI, which is significant in an environment where virtually everything is distributed in binary form. This happens because a property access compiled to CIL byte code is transformed into a call to a getter or setter method, which is a distinct operation from an ordinary attribute access. Whereas in Python, an attribute access is just compiled as an attribute access no matter what the underlying implementation of that access may end up being at run-time.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
zero argument member functions versus properties Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-02 23:09 -0700
Re: zero argument member functions versus properties Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-02 23:11 -0700
Re: zero argument member functions versus properties Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-03 06:52 +0000
Re: zero argument member functions versus properties Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-03 00:19 -0700
Re: zero argument member functions versus properties Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-03 01:06 -0700
Re: zero argument member functions versus properties Ian Kelly <ian.g.kelly@gmail.com> - 2013-11-03 01:53 -0700
Re: zero argument member functions versus properties Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-03 13:23 -0800
Re: zero argument member functions versus properties Ian Kelly <ian.g.kelly@gmail.com> - 2013-11-03 19:27 -0700
Re: zero argument member functions versus properties Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-04 15:14 -0800
csiph-web