Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
combining 2 dictionaries
#3
does not work in 3.6.

the engine logic for this should be the same for sets and dictionaries. that's what i did in my C libraries (not the language i was building long long ago). the C stuff i did was a library for C that implemented a namespace that only used byte string for keys. but it had a no-value assigned capability, somewhat like how None gets used in Python. the C stuff just didn't implement a bunch of types. these were mappings. to create a node you call an add function with just a key. then you call an assign function with the value. it assigned to the last referenced node. you could do a lookup with a key and that was the last reference. if the lookup failed, the last reference was empty and assign would fail. it had other features like forward/reverse stepping (a way to iterate over the mapping).

one of these days, i will look and see how CPython does dictionaries and sets. if Python didn't have sets, i'd just use dictionaries for that.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
combining 2 dictionaries - by Skaperen - Oct-26-2021, 05:40 PM
RE: combining 2 dictionaries - by bowlofred - Oct-26-2021, 06:17 PM
RE: combining 2 dictionaries - by Skaperen - Oct-26-2021, 10:46 PM
RE: combining 2 dictionaries - by bowlofred - Oct-26-2021, 10:57 PM
RE: combining 2 dictionaries - by Skaperen - Oct-29-2021, 11:19 PM
RE: combining 2 dictionaries - by bowlofred - Oct-30-2021, 12:01 AM
RE: combining 2 dictionaries - by Skaperen - Nov-01-2021, 05:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Combining Dictionaries w/o overwriting MC2020 3 1,939 Apr-12-2020, 02:51 AM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020