<div dir="ltr"><div><div><div>> <span class="im">
> var = property(setter, getter, deleter, docs)<br>
> > var = 20</span><br>> <br>> <span class="im">
</span>Can you explain - or, preferably, demonstrate - the difference you're<br>
> talking about here?<br><br></div><div>Sorry, that was untested code. My expectations of class definitions was wrong, as it does not actually change behaviour inside it's own scope. I thought that when you are defining a class, that when you assign a property value to an attribute, that the attribute 'name value' will directly change it's behaviour to include the descriptor properties of the property object assigned. My mistake.<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 April 2016 at 08:32, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, Apr 3, 2016 at 4:05 PM, Matthias welp <<a href="mailto:boekewurm@gmail.com">boekewurm@gmail.com</a>> wrote:<br>
> While keeping the '.__dict__' override method open, the way things work<br>
> currently won't change that much, but it will make the assignment of<br>
> attributes or variables with descriptor properties a lot more intuitive, as<br>
> you do not set a *name* to a variable and then can undo that just a while<br>
> later:<br>
><br>
> var = property(setter, getter, deleter, docs)<br>
> var = 20<br>
><br>
> currently changes behaviour depending on what kind of scope it is located in<br>
> (class description, any other scope), while decorators (for functions at<br>
> least) work in every scope I can think of. I think that is strange, and that<br>
> it should just be the same everywhere.<br>
<br>
</span>Can you explain - or, preferably, demonstrate - the difference you're<br>
talking about here?<br>
<br>
ChrisA<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br></div>