Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48904 > unrolled thread
| Started by | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| First post | 2013-06-21 21:57 -0400 |
| Last post | 2013-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.
Re: n00b question on spacing Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-21 21:57 -0400
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-06-21 21:57 -0400 |
| Subject | Re: 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/
Back to top | Article view | comp.lang.python
csiph-web