Login
You're viewing the code4lib.social public feed.

Replies

  • 💬 0🔄 0⭐ 3
  • Nov 24, 2026, 9:35 PM

    @foone heh, I recently ran into an object storage ORM library that did exactly this. the root object had ".foo.bar" attribute keys for representing the nested objects and then magic functions to compute the lookup key and set/get, rather than properly constructing nested objects. they also injected callback functions and some other weird DI stuff. properly cursed.

    💬 2🔄 0⭐ 2
  • 💬 0🔄 0⭐ 0
  • Nov 24, 2026, 9:40 PM

    @gsuberland @foone this is the kind of thing I've done when I want a cache or sidecar object with the same lifetime and copy semantics.

    I've done munged __private, leading symbol, leading null, non-string, everything.

    💬 1🔄 0⭐ 1
  • Nov 24, 2026, 9:41 PM

    @gsuberland @foone (I've also got a weakref object identity dictionary I copy occasionally, which does something similar, but it forgets the extra data if the object gets copied.)

    💬 0🔄 0⭐ 1
  • 💬 0🔄 0⭐ 3