Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61329
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ikorot01@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; ';-)': 0.03; 'result,': 0.07; '"my': 0.09; 'converted': 0.09; 'function:': 0.09; 'lawrence': 0.09; 'slow.': 0.09; 'subject:extra': 0.09; 'suggestions.': 0.09; 'sure,': 0.09; 'missed': 0.12; 'wrote': 0.14; '12:57': 0.16; 'called.': 0.16; 'dog': 0.16; 'guys,': 0.16; 'igor': 0.16; 'looping': 0.16; 'once.': 0.16; 'roy': 0.16; 'sqlite': 0.16; 'subject:variable': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'variable': 0.18; 'input': 0.22; 'string,': 0.24; 'purposes': 0.26; 'query': 0.26; 'this:': 0.26; '----------': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'tim': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'chase': 0.31; 'convenience': 0.31; 'probably': 0.32; 'text': 0.33; 'url:python': 0.33; 'checking': 0.33; 'guess': 0.33; 'date:': 0.34; 'maybe': 0.34; 'skip:d 20': 0.34; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'dates': 0.36; 'processed': 0.36; 'url:listinfo': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'should': 0.36; 'list': 0.37; 'thank': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'forwarded': 0.39; 'subject:': 0.39; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'called': 0.40; 'url:mail': 0.40; 'engines': 0.60; 'subject:Fwd': 0.61; 'you.': 0.62; 'reach': 0.63; 're:': 0.63; 'valuable': 0.63; 'more': 0.64; 'kept': 0.65; 'worth': 0.66; 'between': 0.67; 'smith': 0.68; 'quality': 0.72; 'article': 0.77; 'reading,': 0.84; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=l3KhxkMa31v17uqq7nCDZulcPz3r1q3zrHCmOoHyh2k=; b=v1otwcopg5tTGR1t6zqI8Ywx+dhU8wSfcH5PMCKtlwZWaARYE1FATq0p29peqpsBvo bSpZrF8gGFIOl84thOL2jLTDRIr6emYlDZpyKP8EARsiAsD/7xGpUnSlNnBIr5lzFk+8 TvGUsQ1gRXDKxImWoXl2khUC94nigZhqjkBKuQIDdiUJvQPpeI5vt6SUOpM+RmorARzi DdCf7Asg50PhZMmAKXpHhEXw50wcYz3CXl7UNpbRgxFF8Cv/GifQ5rE7cp1tBgmHLMNt kCjmUQq2Y08CLqgc78bIfWGDy8KJa662vyIe+hEBYS9F4Feax5LQ5Uk5pOZguLWDQ4jG 5s3Q== |
| MIME-Version | 1.0 |
| X-Received | by 10.53.13.44 with SMTP id ev12mr7713773vdd.17.1386536299062; Sun, 08 Dec 2013 12:58:19 -0800 (PST) |
| In-Reply-To | <CA+FnnTyZzrhwkLvsY0EdvXD_PoTWK45C0=peWGWtse1uEwJC=Q@mail.gmail.com> |
| References | <CA+FnnTzDjRzU65+VWnOwxfVR9FGMDgHLLmLEDOoGE0BMCptzEw@mail.gmail.com> <52A25D94.9040404@islandtraining.com> <CA+FnnTxxJc2J1SF0UHXo1DkZPdN0W5iWhOgBYzfbW1T0GtaSgg@mail.gmail.com> <CA+FnnTzBYp5Fvy1ohCySLitbL21+hHdfur9=oF4TM+Skeu-XJw@mail.gmail.com> <CA+FnnTzkHYNN_rgLaaXwvod9qGhetXRy+3v96+5+wEyhCq0LwA@mail.gmail.com> <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> |
| Date | Sun, 8 Dec 2013 12:58:18 -0800 |
| Subject | Fwd: Eliminate "extra" variable |
| From | Igor Korot <ikorot01@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Mailman-Approved-At | Sun, 08 Dec 2013 23:01:28 +0100 |
| 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.3744.1386540088.18130.python-list@python.org> (permalink) |
| Lines | 50 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1386540089 news.xs4all.nl 2941 [2001:888:2000:d::a6]:55000 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:61329 |
Show key headers only | View raw
---------- Forwarded message ---------- From: Igor Korot <ikorot01@gmail.com> Date: Sun, Dec 8, 2013 at 12:57 PM Subject: Re: Eliminate "extra" variable To: Roy Smith <roy@panix.com> Hi, guys, Thank you for all those valuable suggestions. 2Tim Chase: I guess you missed this: "My originalData comes from the database query" and so the checking of the data quality is a DB burden. ;-) As to the function: the function purpose is to process the data and give out the list of dates and the dictionary of date:frequency. It's input is the query result, so there is no looping when the function is called. It is called only once. Also, the data comes from either SQLite or mySQL and so to eliminate the difference between those engines dates are processed as strings and converted to dates for the calculation purposes only. Maybe I will need to refactor SQLite processing to get the dates as dates and not a string, but that's probably for the future. so that dates will be kept as the datetime type until the end of the function. As I wrote the dates will be used as the text for the plotting window axis labels and as the labels they should come out as strings, hence the conversion. Thank you. On Sun, Dec 8, 2013 at 12:07 PM, Roy Smith <roy@panix.com> wrote: > In article <mailman.3738.1386529877.18130.python-list@python.org>, > Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > >> On 08/12/2013 18:58, Tim Chase wrote: >> > On 2013-12-07 23:14, Igor Korot wrote: >> >> [big snip] >> >> > >> >> Whenever I need date manipulations I always reach out to this >> http://labix.org/python-dateutil > > The problem with dateutil is it's dog slow. Sure, I use it too, when > convenience is more important than performance, but have you ever looked > at the code for dateutil.parser.parse()? It's worth reading, just for > fun. > -- > https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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