title: How to make nested enum also have value
body: <p>Consider the following code example:</p>
  
  <pre><code>from enum import Enum
  
  class Location(Enum):
      Outside = 'outside'
      Inside = 'inside' 
      class Inside(Enum): # TypeError for conflicting names
          Downstairs = 'downstairs'
          Upstairs = 'upstairs'
  </code></pre>
  
  <p>How do I make Inside have the value 'inside' whilst also being a nested enum for accessing Downstairs and Upstairs?</p>
  
  <p>Desired input:</p>
  
  <pre><code>print(Location.Inside)
  print(Location.Inside.value)
  print(Location.Inside.Downstairs)
  print(Location.Inside.Downstairs.value)
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>Location.Inside
  inside
  Location.Inside.Downstairs
  downstairs
  </code></pre>
  
  <p>UPDATE 1:</p>
  
  <p>Some more context to my specific problem:</p>
  
  <pre><code>class Location(Enum):
      Outside = 'outside'
      Inside = 'inside' 
      class Inside(Enum): # TypeError for conflicting names
          Downstairs = 'downstairs'
          Upstairs = 'upstairs'
  
  class Human:
      def __init__(self, location):
          self.location = location
  
  def getLocationFromAPI():
      # this function returns either 'inside' or 'outside'
      # make calls to external API  
      return location # return location from api in str
  
  def whereInside(human):
      if human.location != Location.Inside:
          return None
      # here goes logic that determines if human is downstairs or upstairs
      return locationInside # return either Location.Downstairs or Location.Upstairs
  
  
  location_str = getLocationFromAPI() # will return 'inside' or 'outside'
  location = Location(location_str) # make Enum
  human = Human(location) # create human with basic location
  if human.location == Location.Inside:
      where_inside = whereInside(human)
      human.location = where_inside # update location to be more precise
  </code></pre>
  
  <p>The problem is when I create the Human object I only know of a basic location, as in 'inside' or 'outside'. Only after that can I update the location to be more precise. </p>