Title: [974] trunk/pg.py: Better name for frequent simple types mapping.
Revision
974
Author
cito
Date
2019-04-20 06:45:19 -0400 (Sat, 20 Apr 2019)

Log Message

Better name for frequent simple types mapping.

Contrary to _SimpleTypes, this is not a cache.

Modified Paths

Diff

Modified: trunk/pg.py (973 => 974)


--- trunk/pg.py	2019-04-19 20:59:02 UTC (rev 973)
+++ trunk/pg.py	2019-04-20 10:45:19 UTC (rev 974)
@@ -582,7 +582,7 @@
             return typ.attnames
         return {}
 
-    _simple_types = {
+    _frequent_simple_types = {
         Bytea: 'bytea',
         str: 'text',
         bytes: 'text',
@@ -601,7 +601,7 @@
     def guess_simple_type(cls, value):
         """Try to guess which database type the given value has."""
         # optimize for most frequent types
-        simple_type = cls._simple_types.get(type(value))
+        simple_type = cls._frequent_simple_types.get(type(value))
         if simple_type:
             return simple_type
         if isinstance(value, Bytea):
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to