[PEAK] bulletins example OF DOOM

Stephen C. Waterbury golux at comcast.net
Mon Apr 12 17:22:06 EDT 2004

Phillip J. Eby wrote:
> At 03:55 PM 4/12/04 -0400, Stephen C. Waterbury wrote:
>> Phillip J. Eby wrote:
>>> At 03:22 PM 4/12/04 -0400, Stephen C. Waterbury wrote:
>>>> Phillip J. Eby wrote:
>>>>> 'Date' is not a DBAPI type constant.
>>>> Not in DBAPI 1.0, but DBAPI 1.0 has been "replaced", and 'DATE'
>>>> is no longer specified as a type constant -- 'DATE' does not occur
>>>> in the DBAPI 2.0 specification (PEP 249, which _replaces_ PEP 248).
>>> That's 'DATE', not 'Date'.  'Date' is *not* a PEP 248 DBAPI constant; 
>>> it's a PEP 249 DBAPI *constructor*.
>> I know that.  I did not say that 'Date' is a PEP 248 DBAPI constant;
>> I merely said that "DATE" is specified in PEP 248.  Yes, I know the
>> difference between constants and constructors.  :)
> If you know the difference, why'd you reference 'Date' in your 
> 'supportedTypes' list?  :)

That's an easy one:  because I had no idea what the 'supportedTypes'
list was supposed to do.  It was a black box to me -- sometimes
experimenting is easier than reading code.  :)  But in the
context of PEAK, interpreting the output can be challenging.  ;)

>>>> Since both psycopg and pyPgSQL claim to be DBAPI 2.0-compliant,
>>>> they should treat such type constant names as case-independent,
>>> No.  Date and DATE are two entirely different things that *cannot* be 
>>> mixed.  Please drop that thought right now.
>> It never crossed my mind.  ;)  However, the things should not be
>> confused with their names.  'Date' and 'DATE' are not entirely
>> different things; they are strings.
> Actually, in the syntax I generally use in e-mail, 'Date' and 'DATE' are 
> *names*.  '"Date"' would be a string.  But we digress.  

Actually, I understood that, too.  My 'Date' and 'DATE' (strings
that could be used as names) where not the same as your Date and
DATE (names that you were using to refer to actual code things).

> The main point 
> is that 'supportedTypes' must only include the names of type constants 
> exported by the corresponding DBAPI driver.

And now I know.  A comment might've helped, but maybe the name was
supposed to be sufficient.  :)

> PEAK doesn't do anything 
> with the constructors and doesn't need or want to know anything about them.

Oh, heck ... and here I thought PEAK was omniscient.  :)

More information about the PEAK mailing list