[Chicago] Get/Set/Accessors in Python?

Tim Ottinger tottinge at gmail.com
Wed Dec 5 17:09:08 CET 2012


We have them but they're not terribly useful. they're not all that useful
on c# really since a bar with a getter and setter is effectively a public
variable.

look at "property"
On Dec 5, 2012 7:44 AM, "Malcolm Newsome" <malcolm.newsome at gmail.com> wrote:

> Hey ChiPy,
>
> Python is/was my first language.  Yet, I've recently begun learning C# for
> my new job.
>
> One thing I've come across in C# (and, quite frankly, am having a
> difficult time grasping) is Get and Set (Accessors).
>
> Since, I don't ever recall reading about this in Python, I'm wondering if
> they exist.  If not, what is the "thinking" behind why they are not
> included in the language?
>
> Additionally, a separate, but perhaps related question is that I have not
> seen public/private classes in Python.  How might this factor into the
> whole accessor scenario?  (Or, am I trying to relate two topics that have
> nothing to do with each other?)
>
> Hopefully these questions are clear enough...
>
> Thanks in advance,
>
> Malcolm Newsome
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20121205/d54d7b2a/attachment.html>


More information about the Chicago mailing list