仓库指标
- 星标
- (1 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
Currently, only perl-style templates are supported. It would be nice to support python-style templates.
It's not clear what is the best way to provide this functionality. A global option (via options) is undesirable because it makes reproducibility more difficult. Making pack and unpack generic and dispatching on a template class seems overkill. Adding an argument could be confusing, since the template and the argument might not agree.
Perhaps the easiest way is to let users start the template string with the template type? For example, pack("pl A4 C v", 2, 8, 'sequence'). The "pl" prefix would denote a perl-style template. A "py" prefix would denote a python-style template.