[Python-Dev] PEP 8 and optional underscores
Guido van Rossum
guido at python.org
Fri Jun 13 19:14:14 CEST 2008
On Fri, Jun 13, 2008 at 9:42 AM, Benjamin Peterson
<musiccomposition at gmail.com> wrote:
> On Fri, Jun 13, 2008 at 11:40 AM, Raymond Hettinger <python at rcn.com> wrote:
>>> Nick> def getName(self):
>>> Nick> assert self.__initialized, "Thread.__init__() not called"
>>> Nick> return self.__name
>>
>> Why is __name private to begin with? Any reason for the getters and
>> setters? Why isn't this just an attribute?
>
> In 3.x, it's just an attribute.
Oh, is it? Where's the PEP with the API redesign? Did I miss some kind
of decision-making process, weighing compatibility concerns against
other issues?
Really, I think this all went way too fast, and should be rolled back
and discussed properly *in detail* first.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list