Implement an enum_ property "name"
The property returns the enum_ value as a string.
For example:
>>> import module
>>> module.enum.VALUE
enum.VALUE
>>> str(module.enum.VALUE)
'enum.VALUE'
>>> module.enum.VALUE.name
'VALUE'
This is actually the equivalent of Boost.Python "name" property.
diff --git a/docs/classes.rst b/docs/classes.rst
index 890257d..75a8fb2 100644
--- a/docs/classes.rst
+++ b/docs/classes.rst
@@ -488,6 +488,24 @@
>>> Pet.Kind.__members__
{'Dog': Kind.Dog, 'Cat': Kind.Cat}
+The ``name`` property returns the name of the enum value as a unicode string.
+
+.. note::
+
+ It is also possible to use ``str(enum)``, however these accomplish different
+ goals. The following shows how these two approaches differ.
+
+ .. code-block:: pycon
+
+ >>> p = Pet( "Lucy", Pet.Cat )
+ >>> pet_type = p.type
+ >>> pet_type
+ Pet.Cat
+ >>> str(pet_type)
+ 'Pet.Cat'
+ >>> pet_type.name
+ 'Cat'
+
.. note::
When the special tag ``py::arithmetic()`` is specified to the ``enum_``