Open TeamSpen210 opened 11 months ago
@TeamSpen210, thanks for pointing out this, hopefully just minor, issue. I think we can consider fixing it at some point, possibly when doing some bigger code cleanup. Provided we would rename the start
attribute, I would vote e.g. for start_num
(ordinal
comes too generic to me).
While looking through the codebase to understand it (and maybe write some type stubs), I noticed that
block_token.List
has both a classmethodstart()
, and an attribute with that same name. This does happen to work, but it's rather awkward, and might confuse various tools (or humans).The classmethod seems to be common to all the token classes, so it seems better to rename the attribute form. (
ordinal
perhaps?) Either way it's backwards incompatible, though a custom descriptor class could be used temporarily to produce warnings.