(cls, occupations)
return obj
occupations is a list with two possible meanings:

        - For bosons it is a list of occupation numbers.
          Element i is the number of particles in state i.

        - For fermions it is a list of occupied orbits.
          Element 0 is the state that was occupied first, element i
          is the i'th occupied state.
occupations is a list with two possible meanings:
occupations is a list with two possible meanings :
def __new__(cls, occupations):
        """
        occupations is a list with two possible meanings:

        - For bosons it is a list of occupation numbers.
          Element i is the number of particles in state i.

        - For fermions it is a list of occupied orbits.
          Element 0 is the state that was occupied first, element i
          is the i'th occupied state.
        """
        occupations = list(map(sympify, occupations))
        obj = Basic.__new__(cls, Tuple(*occupations))
        return obj
def __new__ ( cls , occupations ) : occupations = list ( map ( sympify , occupations ) ) obj = Basic . __new__ ( cls , Tuple ( * occupations ) ) return obj