[Python-ideas] [Python-Dev] hello, new dict addition for new eve ? (original) (raw)
Joshua Landau joshua.landau.ws at gmail.com
Tue Jan 3 19:55:45 CET 2012
- Previous message: [Python-ideas] [Python-Dev] hello, new dict addition for new eve ?
- Next message: [Python-ideas] [Python-Dev] hello, new dict addition for new eve ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3 January 2012 18:45, Robert Kern <robert.kern at gmail.com> wrote:
[~] |7> a = {'one': 1}
[~] |8> b = {'one': '1'} [~] |9> set(a.items()) | set(b.items()) set([('one', '1'), ('one', 1)]) [~] |10> dict(set(a.items()) | set(b.items())) {'one': 1}
I don't know what you've done here:
a = {'one': 1} b = {'one': 1} set(a.items()) | set(b.items()) {('one', 1)} dict(set(a.items()) | set(b.items())) {'one': 1}
( However, your point remains:
a = {'number': 1} b = {'number': 2} set(a.items()) | set(b.items()) {('number', 1), ('number', 2)} dict(set(a.items()) | set(b.items())) {'number': 2} ) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120103/a036523d/attachment.html>
- Previous message: [Python-ideas] [Python-Dev] hello, new dict addition for new eve ?
- Next message: [Python-ideas] [Python-Dev] hello, new dict addition for new eve ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]