Skip to content

Refactor some naming functions #41

@thorwhalen

Description

@thorwhalen

Consider this functions from meshed.util:

from meshed.util import (
    mk_func_name,
    find_first_free_name, 
    numbered_suffix_renamer, 
    replace_item_in_iterable
)
from i2.multi_object (
    name_of_obj,
    uniquely_named_objects,
)

They're all around the same "naming" eco system.
The first is to get a function name robustly, the two next ones are to handle duplicate names and the last can be used in this context, but also in a general "iterable editing" context.

There's also some similar functions in i2.

We should hunt these down, deduplicate, add some consistency, and make sure there's some appropriate docs for them.

Do they go in i2? Or partly i2 and partly meshed?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions