Login
You're viewing the code4lib.social public feed.
  • Nov 24, 2026, 9:17 PM

    >>> class Object:
    ... pass
    ...
    >>> obj=Object()
    >>> setattr(obj,'foo.bar','hi')
    >>> obj.foo.bar
    Traceback (most recent call last):
    File "<python-input-4>", line 1, in <module>
    obj.foo.bar
    ^^^^^^^
    AttributeError: 'Object' object has no attribute 'foo'

    💬 6🔄 1⭐ 17

Replies