Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61956

Re: Eliminate "extra" variable

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Eliminate "extra" variable
Date 2013-12-15 12:08 -0500
Organization IISS Elusive Unicorn
References (3 earlier) <roy-E243A9.15072508122013@news.panix.com> <CA+FnnTyZzrhwkLvsY0EdvXD_PoTWK45C0=peWGWtse1uEwJC=Q@mail.gmail.com> <CA+FnnTwSKYs-RAqVT-fZpotte30+xC-oUx-qnidw_qA=uv+KSA@mail.gmail.com> <20131208161858.1365f2d7@bigbox.christie.dr> <CA+FnnTz-T8S3Z-Qaa7T_mHke-1+XN8-iZifnhBoS+aWQhje46A@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4146.1387127306.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, 14 Dec 2013 23:49:58 -0800, Igor Korot <ikorot01@gmail.com>
declaimed the following:


>
>So, I guess this is a bug in the sqlite3 python module as datetime is
>legal data type on the DB engine.
>
	Note though, SQLite3 only has four native data types: integer, float,
character, blob. It accepts almost anything for a type declaration, and
will map that to the closest internal format (moreover, it will accept any
actual datatype in any actual field -- you can store strings in an integer
field unless the string content IS a representation of an integer in which
case it is turned to binary).

	Regardless of how Python stores a date/datetime/time (well, except for
the floating point C date/time types), it will mostly be kept as a string
representation within SQLite3. 

	It then becomes the responsibility of the converter modules invoked by
the parsing option to identify and format the data. I suspect date and
datetime both parse into the same converter. I'm not sure how it behaves if
one defined converters for date and datetime separately, as I think it uses
substring matching to invoke the converter: a type of date and a type of
datetime would both match a converter for "date" if the date converter is
first in the lookup list.


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Eliminate "extra" variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-08 19:10 +0000
  Re: Eliminate "extra" variable Roy Smith <roy@panix.com> - 2013-12-08 15:07 -0500
    Fwd: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-08 12:58 -0800
    Re: Eliminate "extra" variable Tim Chase <python.list@tim.thechases.com> - 2013-12-08 16:18 -0600
    Re: Fwd: Eliminate "extra" variable Dave Angel <davea@davea.name> - 2013-12-08 17:36 -0500
    Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-14 23:49 -0800
    Re: Eliminate "extra" variable Tim Chase <python.list@tim.thechases.com> - 2013-12-15 06:17 -0600
    Re: Eliminate "extra" variable Tim Chase <python.list@tim.thechases.com> - 2013-12-15 06:29 -0600
    Re: Eliminate "extra" variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-15 12:08 -0500
    Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-15 14:46 -0800
    Re: Eliminate "extra" variable MRAB <python@mrabarnett.plus.com> - 2013-12-16 00:58 +0000
    Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-15 18:43 -0800
    Re: Eliminate "extra" variable Dave Angel <davea@davea.name> - 2013-12-15 21:58 -0500
    Re: Eliminate "extra" variable Chris Angelico <rosuav@gmail.com> - 2013-12-16 13:57 +1100
    Re: Eliminate "extra" variable Igor Korot <ikorot01@gmail.com> - 2013-12-15 20:24 -0800

csiph-web