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


Groups > comp.lang.python > #48904

Re: n00b question on spacing

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'skip:% 20': 0.09; 'undefined': 0.09; 'wrapped': 0.09; 'subject:question': 0.10; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'valid.': 0.16; 'written': 0.21; '(the': 0.22; 'url:home': 0.24; 'this:': 0.26; 'header:X-Complaints-To:1': 0.27; 'concern': 0.31; 'indentation': 0.31; 'fri,': 0.33; 'knowledge': 0.35; 'skip:s 30': 0.35; 'charset:us-ascii': 0.36; 'level': 0.37; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; 'short': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'break': 0.61; 'new': 0.61; 'within': 0.65; 'reply': 0.66; '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: n00b question on spacing
Date Fri, 21 Jun 2013 21:57:13 -0400
Organization IISS Elusive Unicorn
References <CAJ=2b07ETuSuo2+3Xu6vMOJA+q1JwUFTezO3LaYLG8wXd+FLBQ@mail.gmail.com> <24094189.2779.1371851333304.JavaMail.rgacote@ip-225.appropriatesolutions.com> <CAJ=2b06j44KSS=sD-TC7yfiXFA739OSkvyYyLs4fD8SzGDjS4g@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-22-77.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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3682.1371866252.3114.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371866252 news.xs4all.nl 15887 [2001:888:2000:d::a6]:36181
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48904

Show key headers only | View raw


On Fri, 21 Jun 2013 18:00:58 -0400, "Yves S. Garret"
<yoursurrogategod@gmail.com> declaimed the following:

>
>Thanks for your reply Ray.  My concern was that if I were to break with
>something like this:
>      log.msg("Item written to MongoDB database %s/%s"
>    %(settings['MONGODB_DB'], settings['MONGODB_COLLECTION']),
>    level = log.DEBUG, spider = spider)
>
>I would get some undefined behaviour (the % is a little before the log.msg).
>
>I'll read the links that you provided in order to learn more.

	The short knowledge is just that anything within unclosed ([{ can be
wrapped to a new line; it isn't indentation sensitive.

	log.msg("Item written to MongoDB database %s/%s"
			% (	settings["MONGODB_DB"],
				settings["MONGODB_COLLECTION"]	),
			level = log.DEBUG,
			spider = spider)

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

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


Thread

Re: n00b question on spacing Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-21 21:57 -0400

csiph-web