Might make more sense to be dict.default(int), that way it doesn't have redundant dict names. Only problem is then it might be a bit confusing, since you could do {1:2, 3:4}.default(int) and not get the values back. Maybe 'withdefault', and return a copy if called on the instance? _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-ideas] dict(default=int) Steven Piantadosi
- Re: [Python-ideas] dict(default=int) Mahmoud Hashemi
- Re: [Python-ideas] dict(default=int) Chris Angelico
- Re: [Python-ideas] dict(default=int) Chris Angelico
- Re: [Python-ideas] dict(default=int) Eric V. Smith
- Re: [Python-ideas] dict(default=int) Barry Warsaw
- Re: [Python-ideas] dict(default=in... Chris Barker
- Re: [Python-ideas] dict(defaul... Spencer Brown
- Re: [Python-ideas] dict(de... Erik
- Re: [Python-ideas] dict(de... Chris Angelico
- Re: [Python-ideas] dict(defaul... Wes Turner
- Re: [Python-ideas] dict(defaul... Neil Girdhar
- Re: [Python-ideas] dict(de... Matt Gilson
- Re: [Python-ideas] dict(de... Neil Girdhar
- Re: [Python-ideas] dict(de... Chris Angelico
- Re: [Python-ideas] dict(de... Ryan Gonzalez
- Re: [Python-ideas] dict(default=int) Dan Sommers
- Re: [Python-ideas] dict(default=int) Markus Meskanen