..
  NOTE: This RST file was generated by `make examples`.
  Do not edit it directly.
  See docs/source/examples/example_doc_generator.py

.. _ex-default_value:

Default Value Example
===============================================================================

 Demonstrate all the ways to initialize a value

1. Pass the value directly
2. Assign the default value explicitly
3. Provide the value during initialization of the object
4. Provide factory callable that returns a value
5. Use a _default_* static method

.. TIP:: To see this example in action, download it from
 :download:`default_value <../../../examples/api/default_value.py>`
 and run::

   $ python default_value.py

Example Atom Code
-------------------------------------------------------------------------------
.. literalinclude:: ../../../examples/api/default_value.py
    :language: python
