docs: explain why impl has no public attributes property

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
This commit is contained in:
Alexander Tkachev 2022-07-24 22:02:48 +03:00
parent b9e8763594
commit 62595ffc3b
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,12 @@ class CloudEvent(abc.ABC):
We don't wont to restrict our future selves. We don't wont to restrict our future selves.
When a write model will be needed, it will be implemented When a write model will be needed, it will be implemented
The we don't have an `attributes` property is to prevent API confusion
Examples of confusion:
* What is the difference between `event.get("myattr")` and
`event.attributes.get("myattr")`
* What SHOULD I use `event["myattr"]` or `event.attributes["myattr"]` ?
""" """
pass pass