[issue27252] Make dict views copyable

2016-06-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
stage: patch review -> 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



[issue27252] Make dict views copyable

2016-06-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

See also:  http://bugs.python.org/issue27253

--

___
Python tracker 

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



[issue27252] Make dict views copyable

2016-06-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think we should stop adding features like this without actual user requests 
and real use cases to show necessity and to inform the design.

--

___
Python tracker 

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



[issue27252] Make dict views copyable

2016-06-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I didn't encounter this.

--

___
Python tracker 

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



[issue27252] Make dict views copyable

2016-06-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm still not clear about the use case -- have you heard from people who had to 
work around the current situation?  Use of the copy module is often a code 
smell in my experience, so I don't want to encourage it.

--

___
Python tracker 

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



[issue27252] Make dict views copyable

2016-06-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch adds support of dict views in the copy module.

Since dict views are immutable, copy.copy() just returns the same object.

copy.deepcopy() returns a frozenset for the dict_keys object, a tuple for the 
dict_values object, and a dict_items object for the dict_items object. Only 
needed data is copied (keys for dict_keys, values for dict_values).

--
components: Library (Lib)
files: dict_views_copy.patch
keywords: patch
messages: 267701
nosy: gvanrossum, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Make dict views copyable
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43280/dict_views_copy.patch

___
Python tracker 

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