CircArgs commented on a change in pull request #4016:
URL: https://github.com/apache/iceberg/pull/4016#discussion_r796919451



##########
File path: python/src/iceberg/types.py
##########
@@ -48,27 +46,69 @@ def __str__(self):
 
     @property
     def is_primitive(self) -> bool:
-        return self._is_primitive
+        return isinstance(self, PrimitiveType)
+
 
+class PrimitiveType(Type):
+    """Base class for all Iceberg Primitive Types"""
+
+    _implemented = {}  # type: ignore
+
+    def __new__(cls):
+        if cls in cls._implemented:
+            return cls._implemented[cls]
+        else:
+            ret = object.__new__(cls)

Review comment:
       it's a dictionary, but I put it there so that `get` would work otherwise 
I have to first check for `None` right?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to