introspection: simplify writing of attributes