R. David Murray added the comment:

So you are basically wanting to be able to create read only attributes that 
don't have a _ in front of them even internally.

I don't think that's something Python core should add.  Read only attributes 
should be an exceptional case in most python programs.  Fraction uses them 
because Fraction is an immutable type and those properties are involved in the 
hash calculation.

I've written an immutable class with a number of attributes (email.policy), and 
my solution involved a custom __setattr__, which really makes more sense for my 
use case.  So I think this should be left to the application/library to decide. 
That is, the solution isn't universal enough to go in the stdlib, IMO.

So, long story short, I'm -1 :)

----------
nosy: +r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24897>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to