def __setattr__(self, name, value):
        """Set a PyTables attribute.

        Sets a (maybe new) PyTables attribute with the specified `name`
        and `value`.  If the attribute already exists, it is simply
        replaced.

        A ``ValueError`` is raised when the name starts with a reserved
        prefix or contains a ``/``.  A `NaturalNameWarning` is issued if
        the name is not a valid Python identifier.  A
        `PerformanceWarning` is issued when the recommended maximum
        number of attributes in a node is going to be exceeded.

        """

        nodefile = self._v__nodefile
        attrnames = self._v_attrnames

        # Check for name validity
        check_attribute_name(name)

        nodefile._check_writable()

        # Check if there are too many attributes.
        max_node_attrs = nodefile.params['MAX_NODE_ATTRS']
        if len(attrnames) >= max_node_attrs:
            warnings.warn("""\
node ``%s`` is exceeding the recommended maximum number of attributes (%d);\
be ready to see PyTables asking for *lots* of memory and possibly slow I/O"""
                          % (self._v__nodepath, max_node_attrs),
                          PerformanceWarning)

        undo_enabled = nodefile.is_undo_enabled()
        # Log old attribute removal (if any).
        if undo_enabled and (name in attrnames):
            self._g_del_and_log(name)

        # Set the attribute.
        self._g__setattr(name, value)

        # Log new attribute addition.
        if undo_enabled:
            self._g_log_add(name)
dataset/ETHPy150Open PyTables/PyTables/tables/attributeset.py/AttributeSet.__setattr__/original