`block_token.List.start` is both a classmethod and attribute
Opened this issue · 1 comments
While looking through the codebase to understand it (and maybe write some type stubs), I noticed that block_token.List
has both a classmethod start()
, 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.
@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).