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


Groups > comp.lang.python > #61956

Re: Eliminate "extra" variable

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'string': 0.09; 'character,': 0.09; 'closest': 0.09; 'lookup': 0.09; 'parsing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:extra': 0.09; 'types:': 0.09; 'python': 0.11; 'bug': 0.12; 'mostly': 0.14; 'accepts': 0.16; 'igor': 0.16; 'integer,': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:variable': 0.16; 'substring': 0.16; 'sat,': 0.16; 'module': 0.19; 'integer': 0.24; 'parse': 0.24; 'url:home': 0.24; 'regardless': 0.24; 'defined': 0.27; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'dec': 0.30; 'matching': 0.30; "i'm": 0.30; 'invoke': 0.31; 'option': 0.32; 'becomes': 0.33; 'guess': 0.33; 'actual': 0.34; 'except': 0.35; 'charset:us-ascii': 0.36; 'list.': 0.37; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'subject:" ': 0.39; 'though,': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'identify': 0.61; 'first': 0.61; 'field': 0.63; 'map': 0.64; 'kept': 0.65; 'within': 0.65; 'converters': 0.84; 'float,': 0.84; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Eliminate "extra" variable
Date Sun, 15 Dec 2013 12:08:15 -0500
Organization IISS Elusive Unicorn
References <CA+FnnTwZ3aF++ZzaAJzG0Y98usfLTge0KTzj14LfqDgh1OnsZQ@mail.gmail.com> <20131208125823.241112db@bigbox.christie.dr> <mailman.3738.1386529877.18130.python-list@python.org> <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>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-76-249-23-207.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 6.00/32.1186
X-No-Archive YES
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4146.1387127306.18130.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387127306 news.xs4all.nl 2972 [2001:888:2000:d::a6]:56409
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61956

Show key headers only | 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