Add a more flexible version of attr.