kojiromike commented on code in PR #2250:
URL: https://github.com/apache/avro/pull/2250#discussion_r1260487295
##########
lang/py/avro/schema.py:
##########
@@ -587,6 +587,15 @@ def symbols(self) -> Sequence[str]:
return symbols
raise Exception
+ @property
+ def default(self) -> Union[str, None]:
+ symbol = self.get_prop("default")
+ if isinstance(symbol, str):
+ return symbol
+ if symbol is None:
+ return None
+ raise Exception
Review Comment:
Please consider raising a more specific exception in this case. Would
[avro.errors.InvalidDefault](https://github.com/apache/avro/blob/895c3db01860c44eef9f21de642b63049550366b/lang/py/avro/errors.py#L47)
make sense?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]