Issue 17458: Automatic type conversion from set to frozenset

Issue17458

Created on 2013-03-18 12:53 by jamartinh, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg184451 - (view) Author: Jose Antonio Martin H (jamartinh) Date: 2013-03-18 12:53
Is it possible to consider the automatic type conversion from set to frozenset whenever a set is declared inside a set, as the key of a Counter and as the key of a Dict? Tha is, the case when a set is used but a hashable object is requested.

Having to deal with typing frozenset every time is very uncomfortable and it is quite natural to work with sets of sets.

If you get an exception when trying to create a set of set then why not deferring such exception to the case of trying to modify an immutable set?
msg184455 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-03-18 14:24
I think this is python-ideas material.  Automatic conversions are usually not a good idea though.
History
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61660
2013-03-18 14:24:11ezio.melottisetstatus: open -> closed

versions: - Python 3.1, Python 2.7, Python 3.2, Python 3.3, Python 3.5
nosy: + ezio.melotti

messages: + msg184455
resolution: rejected
stage: resolved

2013-03-18 12:53:43jamartinhcreate