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


Groups > comp.lang.python > #48904 > unrolled thread

Re: n00b question on spacing

Started byDennis Lee Bieber <wlfraed@ix.netcom.com>
First post2013-06-21 21:57 -0400
Last post2013-06-21 21:57 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#48904 — Re: n00b question on spacing

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-06-21 21:57 -0400
SubjectRe: n00b question on spacing
Message-ID<mailman.3682.1371866252.3114.python-list@python.org>
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/

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web