2.3. Dragon ADR Init Name

  • Create dragon named "Wawelski"

2.3.1. Option 1

>>> dragon = Dragon(str)  # positional

Example:

>>> dragon = Dragon('Wawelski')

Pros and Cons:

  • Good: easy to use

  • Bad: less verbose than keyword arguments

  • Decision: candidate

2.3.2. Option 2

>>> dragon = Dragon(name=str)  # keyword

Example:

>>> dragon = Dragon(name='Wawelski')

Pros and Cons:

  • Good: easy to use

  • Good: more verbose than positional arguments

  • Bad: too verbose for such simple example

  • Decision: rejected, too verbose for such simple example

2.3.3. Decision

>>> class Dragon:
...     def __init__(self, name: str, /) -> None: ...
>>>
>>>
>>> dragon = Dragon('Wawelski')

Pros and Cons:

  • Easy to use

  • Verbose enough