@classmethod
def from_doc(cls, doc, aliases={}):
    """
        Constructs a namespace object from a namespace doc returned by the API
        site_info call.
        """
    return cls(doc['id'], doc['*'], canonical=doc.get('canonical'), aliases
        =set(aliases.get(doc['id'], [])), case=doc['case'], content=
        'content' in doc)
