[issue27070] Add ability to freeze (seal) mutable objects

2016-05-21 Thread Eric V. Smith

Eric V. Smith added the comment:

There's a link in the PEP to the discussion on why it was rejected. There's a 
lot to read in the thread (I just spent 30 minutes re-reading it!).

I'm going to close this. If you'd like to re-open the discussion with new 
insights, I'd suggest posting to python-ideas. But, given the existing 
discussion referenced by the PEP, I don't have high hopes, unless you have a 
compelling use case (which is always possible, of course).

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27070] Add ability to freeze (seal) mutable objects

2016-05-20 Thread Марк Коренберг

Марк Коренберг added the comment:

Great. Do you have information why this PEP was rejected? This was exactly what 
I want.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27070] Add ability to freeze (seal) mutable objects

2016-05-20 Thread Eric V. Smith

Eric V. Smith added the comment:

See the rejected PEP 351: https://www.python.org/dev/peps/pep-0351/

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27070] Add ability to freeze (seal) mutable objects

2016-05-20 Thread ppperry

ppperry added the comment:

Python is not the type of language in which one applies such memory 
micro-optimizations. In any case, if you really need to do this, use a custom 
class that subclasses `list` and overrides the modification methods to add a 
check.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27070] Add ability to freeze (seal) mutable objects

2016-05-20 Thread Марк Коренберг

Марк Коренберг added the comment:

making tuples (from lists), fronzensets(from sets) and bytes (from bytearray) 
requires memory copying. Especially for bytearrays.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27070] Add ability to freeze (seal) mutable objects

2016-05-20 Thread ppperry

ppperry added the comment:

Use tuples, frozensets, and bytes for the first three cases instead. I don't 
quite see what the benefit of this is. It seems arbitrarily restrictive.

--
nosy: +ppperry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27070] Add ability to freeze (seal) mutable objects

2016-05-20 Thread Марк Коренберг

New submission from Марк Коренберг:

I mean making mutable object immutable. I speak about List(), Set(), 
bytearray(), memoryview(), mmap() and so on.

bytearray already have `hold`, to lock size only, but it still not represented 
in Python.

--
components: Library (Lib)
messages: 265965
nosy: mmarkk
priority: normal
severity: normal
status: open
title: Add ability to freeze (seal) mutable objects
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com