homepage

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.

classification
Title: set and frozenset constructors don't accept multiple iterables
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: eric.araujo, giampaolo.rodola, petri.lehtinen, rhettinger, terry.reedy
Priority: low Keywords:

Created on 2012年02月09日 08:16 by petri.lehtinen, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (5)
msg152931 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012年02月09日 08:16
set.update() and friends accept multiple iterables. IMHO, set and frozenset constructors should, too.
msg153084 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012年02月11日 00:56
It is present in union and intersection because chained operations are reasonably common. I don't think it makes much sense in the constructors because it doesn't correspond to how people think of (make this a set).
msg153096 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012年02月11日 05:17
As a set user (not developer), I think that the proposed feature is not needed, and the change would make set/frozenset less similar to list and tuple, which would be a bad thing.
msg153168 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012年02月12日 04:43
I believe s = set(); s.update(s1, s2, s3, ...) 
a) does what is requested;
b) is the proper spelling, as the request *is* for a union of input collections.
So I recommend closing.
msg153462 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012年02月16日 07:05
Ok, closing because of lack of support for the idea.
History
Date User Action Args
2022年04月11日 14:57:26adminsetgithub: 58180
2012年02月16日 07:05:44petri.lehtinensetstatus: open -> closed
resolution: wont fix
messages: + msg153462
2012年02月12日 04:43:58terry.reedysetnosy: + terry.reedy
messages: + msg153168
2012年02月11日 05:17:37eric.araujosetnosy: + eric.araujo
messages: + msg153096
2012年02月11日 00:56:48rhettingersetpriority: normal -> low

nosy: + rhettinger
messages: + msg153084

assignee: rhettinger
2012年02月09日 09:27:05giampaolo.rodolasetnosy: + giampaolo.rodola
2012年02月09日 08:16:27petri.lehtinencreate

AltStyle によって変換されたページ (->オリジナル) /