Steven D'Aprano wrote:
On Thu, 17 Mar 2016 11:31 am, Chris Angelico wrote:

   orig = globals()[cls.__name__]

I wouldn't want to rely on it working with decorator syntax either. Even if
it does now, I'm not sure that's a language guarantee.

The following idiom relies on similar behaviour:

    @property
    def x(self):
        return self._x

    @x.setter
    def x(self, value):
        self._x = value

That's taken from the official docs, so I don't think
this is likely to change any time soon.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to