Closed thorwhalen closed 2 years ago
Deprecated (warning) Sig.names_for_kind(kind)
method and replaced all known usages (in code, note notebooks) with the new names_of_kind[kind]
property.
I will make going through the properties and methods of Sig
and replacing relevant code with use of names_of_kind
a separate issue and assign to @sylvainbonnot or @valentin-feron.
Moved to https://github.com/i2mint/i2/issues/23 where it belongs
This would be a
functools.cached_property
ofSig
that would give us a tuple containing tuples of names for each kind.It's behavior would be as such:
We would then be able to address issue 25 by putting this validation in
Sig.__init__
:A (valid) critique is that it's an extra overhead in the signature construction, but we get more validation, which is good in the long run for all the meta-programming purposes that we use
Sig
for.We keep
self.names_of_kind
around because with it we can then compute several other properties and method more easily/quickly with it around.