[issue24991] Define instance mutability explicitly on type objects?

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Declaring "I intend for instances of this class to be immutable" isn't a fuzzy concept - it's in the same vein as other type hints, like "I intend for this to be a string". The part that's fuzzy is how well Python actually enforces that

[issue24991] Define instance mutability explicitly on type objects?

2017-12-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

[issue24991] Define instance mutability explicitly on type objects?

2017-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this is a hazardous path that should be avoided. Mutability is an elusive concept that is hard to pin down. Files are immutable when opened in a read-only mode and mutable if opened in a write mode. Tuples are

[issue24991] Define instance mutability explicitly on type objects?

2017-12-09 Thread Nick Coghlan
Nick Coghlan added the comment: I updated some of the issue metadata and added a question mark to the issue title to help make it clearer that this would require a PEP level conceptual enhancement to the language, rather than being about documenting an existing concept.

[issue24991] Define instance mutability explicitly on type objects

2015-09-09 Thread Nick Coghlan
Nick Coghlan added the comment: Also adding Trent Nelson to the nosy list, as I believe this capability could potentially be relevant to PyParallel. The reason I say that is that if instance mutability (or the lack thereof) becomes a first class language concept, then we may be able to adopt

[issue24991] Define instance mutability explicitly on type objects

2015-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___

[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Eugene Toder
Changes by Eugene Toder : -- nosy: +eltoder ___ Python tracker ___ ___ Python-bugs-list

[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Nick Coghlan
New submission from Nick Coghlan: Issue #24912 showed that the interpreter has historically assumed that all instances of non-heap types are immutable when it comes to preventing __class__ reassignment, and changing this assumption caused problems with genuinely immutable types that use

[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Nathaniel Smith
Nathaniel Smith added the comment: Adding Eric Snow to nosy because it seems like there may be some natural overlap between this and the per-subinterpreter GIL ideas he brought up on python-ideas back in June. -- nosy: +eric.snow ___ Python tracker

[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Eric Snow
Eric Snow added the comment: Yeah, this definitely relates to the project I'm working on. -- ___ Python tracker ___