This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients abarry, ethan.furman, r.david.murray, skip.montanaro
Date 2015-08-20.14:28:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440080920.35.0.0978874272983.issue24897@psf.upfronthosting.co.za>
In-reply-to
Content
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 :)
History
Date User Action Args
2015-08-20 14:28:40r.david.murraysetrecipients: + r.david.murray, skip.montanaro, ethan.furman, abarry
2015-08-20 14:28:40r.david.murraysetmessageid: <1440080920.35.0.0978874272983.issue24897@psf.upfronthosting.co.za>
2015-08-20 14:28:40r.david.murraylinkissue24897 messages
2015-08-20 14:28:39r.david.murraycreate