[Python-ideas] Decorators for variables
Ethan Furman
ethan at stoneleaf.us
Sun Apr 3 01:47:26 EDT 2016
On 04/02/2016 09:02 PM, Steven D'Aprano wrote:
> On Fri, Apr 01, 2016 at 08:08:54PM +0200, Matthias welp wrote:
>
>>> So instead of
>>>
>>> a = Char(length=10, value='empty')
>>>
>>> you want
>>>
>>> @Char(length=10)
>>> a = 'empty'
>>>
>>> ?
>>
>> If possible, yes. So that there is a standardized way to access changing
>> variables, or to put limits on the content of the variable,
Steven, the above was a short cut of a name-binding inside a class
definition.
Sorry for the confusion.
--
~Ethan~
More information about the Python-ideas
mailing list