HENNGE / aiodynamo

Asynchronous, fast, pythonic DynamoDB Client
https://aiodynamo.readthedocs.io/
Other
69 stars 20 forks source link

Simplify/refactor #173 #174

Closed dimaqq closed 6 months ago

dimaqq commented 6 months ago

@ojii here

ojii commented 6 months ago

sorry, I really prefer ensuring correctness at the type level if possible, so I'm going to close this.

dimaqq commented 6 months ago

No problem. Consider including the missed logical branch from the comment above.

dimaqq commented 6 months ago

sorry, I really prefer ensuring correctness at the type level if possible, so I'm going to close this.

I was going to suggest a type guard, but that would require py 3.10 ¯\_(ツ)_/¯ https://devguide.python.org/versions/

dimaqq commented 6 months ago

Just a thought: another option would be to override AndCondition and OrCondition constructors to ensure the contents is of the correct length.