bigchaindb / bigchaindb/cryptoconditions

Why is Condition a metaclass?

Open
#41 1 comment 0 reactions 1 assignee Claimed by @diminator View on GitHub
question
Dominant language
Python
Stars
73
Forks
40
PR merge metrics
No merged PRs in 30d

Description

On a related note, why not provide an `__init__` to `Condition`?

Such that instead of the following

```python
condition = Condition()
condition.type_id = type_id
condition.bitmask = bitmask
condition.hash = _hash
condition.max_fulfillment_length = max_fulfillment_length
```

we could simply do:

```python
condition = Condition(
type_id=self.type_id,
bitmask=self.bitmask,
hash=_hash,
max_fulfillment_length=max_fulfillment_length,
)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.