Skip to content

lattice_memebers.Concept vs _common.Concept API #23

@mikulatomas

Description

@mikulatomas

Hi,

I found quite counter-intuitive (for me) API naming.

In case of _common.Concept we have

@property
def objects(self) -> typing.Tuple[str]:
    """The objects subsumed by the concept."""
    return self.extent.members()

In case of lattice_members.Concept we have

@property
def extent(self) -> typing.Tuple[str, ...]:
    """The objects subsumed by the concept.

    Example:
        >>> import concepts
        >>> lattice = concepts.Context.fromstring(concepts.EXAMPLE).lattice
        >>> lattice['+1',].extent
        ('1sg', '1pl')
    """
    return self._extent.members()

and Concept.objects works differently.

I would prefer to have same API, that is, Vector extent can be hidden in concept._extent property, public list of members names can be concept.extent or concept.objects and original concept.objects can be renamed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions