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


Groups > comp.lang.python > #103147

Re: Question on keyword arguments

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Tim Chase <python.list@tim.thechases.com>
Newsgroups comp.lang.python
Subject Re: Question on keyword arguments
Date Thu, 18 Feb 2016 13:20:55 -0600
Lines 18
Message-ID <mailman.21.1455824012.2289.python-list@python.org> (permalink)
References <62136715E19142B6B318EA3A3DF04D40@OPTIPLEX990> <na4kut$ru8$1@ger.gmane.org> <7278ec3f250548b192ce2d95c6fa07c5@seaexchmbx03.olympus.F5Net.com> <CAPTjJmoSX8stV5FBLALGctahP++n6+xfbMy6nXa0PMTr0aS17w@mail.gmail.com> <52FA2B3109D743E2BB8534CAC2B5E8A5@OPTIPLEX990>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de FcAVQRJsOysyYWIlZDYntQqGAjTphDE0MvwBxRHC+drA==
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Question': 0.05; 'ugly': 0.07; 'python': 0.10; ':-)': 0.12; '-tkc': 0.16; "format'": 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'tim,': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.24; 'converting': 0.27; "skip:' 10": 0.28; 'convert': 0.29; 'code': 0.30; "i'd": 0.31; 'operate': 0.32; 'returned': 0.32; 'received:10.43': 0.33; 'throughout': 0.34; 'lists': 0.34; 'that,': 0.34; 'done': 0.35; 'possible,': 0.35; 'unicode': 0.35; 'possible': 0.36; 'data.': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'there,': 0.37; 'charset:us-ascii': 0.37; 'late': 0.38; 'to:addr:python.org': 0.40; 'still': 0.40; 'your': 0.60; 'real': 0.62; 'back': 0.62; 'soon': 0.65; 'received:23': 0.84
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1455823422248:564408328
X-MC-Ingress-Time 1455823422248
In-Reply-To <52FA2B3109D743E2BB8534CAC2B5E8A5@OPTIPLEX990>
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
X-AuthUser tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
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>
Xref csiph.com comp.lang.python:103147

Show key headers only | View raw


On 2016-02-18 10:57, grsmith@atlanticbb.net wrote:
> Tim, the 'crazy-other-result format' is the
> result returned by the database, nothing
> I can do about that :)

then, much like converting byte-strings to unicode strings as early
as possible and converting them back to byte-strings as late as
possible, I'd do the same with your DB results:  change them into
real Python lists as soon as they come out of the DB, operate on them
throughout your code as real lists, and only convert them back to
crazy-other-format at the time you write them back to the DB.

My condolences on having to deal with ugly data.  Been there, done
that, still stuck with it. :-)

-tkc

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


Thread

Re: Question on keyword arguments Tim Chase <python.list@tim.thechases.com> - 2016-02-18 13:20 -0600

csiph-web