-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 1, 2007, at 10:01 AM, Guido van Rossum wrote:

> On 10/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> As long as we're all tossing out ideas here, my 2ยข.  I vastly prefer
>> this:
>>
>> On 02:43 am, [EMAIL PROTECTED] wrote:
>>> On 10/31/07, Fred Drake <[EMAIL PROTECTED]> wrote:
>>
>>>>        @property.set
>>>>        def attribute(self, value):
>>>>            self._ignored = value
>>
>> to this:
>>>      @property.set(attribute)
>>>      def attribute(self, value):
>>>          self._ignored = value
>>
>> since I don't see any additional expressive value in the latter,  
>> and it
>> provides an opportunity to make a mistake.
>
> I was expecting this would be brought up, but that just ain't gonna
> happen. If you don't repeat the name, the decorator has to root around
> in the surrounding scope, which is fraught with peril. Solutions based
> on sys._getframe() have been around for years (e.g. several the
> Cookbook recipes) and if I had approved of that technique I would have
> adopted one long ago.

It's also not as if you're writing some string value the second time,  
so any typos in the name will be caught early on.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQCVAwUBRyoLjnEjvBPtnXfVAQKcHAQAt8cmfJa93nVMX4/cIUTzUvke2LMhiKbj
5auo/TlymK6GMrKCLSpIOVfxMboj0tf5RqL8oS72OS6w6K+jlBiVFRZPf0NQtO1s
WXsKDR/tw5B8iiTsoi8CRASsbEBetTrHIa5WqWqYbNk1sE7GNGTK4kIGoMd1txyp
IdhLvYSJK7Q=
=v4I7
-----END PGP SIGNATURE-----
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to