kojiromike commented on a change in pull request #1156:
URL: https://github.com/apache/avro/pull/1156#discussion_r608734712



##########
File path: lang/py/avro/errors.py
##########
@@ -44,9 +44,9 @@ class IgnoredLogicalType(AvroWarning):
 
 class AvroTypeException(AvroException):
     """Raised when datum is not an example of schema."""
-    def __init__(self, expected_schema, datum):
+    def __init__(self, expected_schema, name, datum):

Review comment:
       These exceptions predate me, but I think it's a mistake that they have 
required arguments to their `__init__` methods. I'd suggest that they should be 
polymorphic in that their first argument should be either the concrete 
exception message _or_ these kwargs.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to