Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48883
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!usenet.ukfsn.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <yoursurrogategod@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.012 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'skip:% 20': 0.09; 'subject:question': 0.10; 'python': 0.11; 'wrote': 0.14; 'code?': 0.16; 'splitting': 0.16; 'terribly': 0.16; 'rules': 0.22; 'question': 0.24; 'code:': 0.26; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; 'breaking': 0.31; 'screen': 0.34; 'skip:s 30': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'hi,': 0.36; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'eyes': 0.78; 'ok?': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=rojKzVwM8+rM+y2B6Q43XSufaR2H1N7cUeb+yFGiXek=; b=v3DeAKbv6rR4HnhRbfKxOY9wPiP00+ki1eShA6JPdVu5Ug1iaSs1q8Sn5WtJueABMj iAU0+ql7eXE8n99gHUsKkjn8EQoTLlMp9/UlC981bLU9oXAaKrxoIIGzwske2hAgjE6n 4LreXkik/atdpb4Nu+qH6rutgTl7Bz7hfUIRAERtRUlvflSfmy6yjgyQPz3xPqsPqirc 3Ww/d9l6Or0rDjBvK4L4GMvz48A749bxLHVs2dwoMIFyfemSVCNxSojhsgwBZGxqEbtd DiWMFUI9Yi9YBcxV+Tc3KRLnpbYhd1KQw9v0inlbJ0IxCU+dn7o0jMGZ/jMa8LU7Xv3n 4rwg== |
| MIME-Version | 1.0 |
| X-Received | by 10.194.11.72 with SMTP id o8mr10698265wjb.0.1371849448580; Fri, 21 Jun 2013 14:17:28 -0700 (PDT) |
| Date | Fri, 21 Jun 2013 17:17:28 -0400 |
| Subject | n00b question on spacing |
| From | "Yves S. Garret" <yoursurrogategod@gmail.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=e89a8f234d49116a1704dfb09782 |
| 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.3669.1371849457.3114.python-list@python.org> (permalink) |
| Lines | 42 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1371849457 news.xs4all.nl 15947 [2001:888:2000:d::a6]:33698 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:48883 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi, I have a question about breaking up really long lines of code in Python.
I have the following line of code:
log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider)
Given the fact that it goes off very far to the right on my screen is not
terribly
pleasing to my eyes (and can be rude for other developers).
I was thinking of splitting it up like so:
log.msg("Item wrote to MongoDB database %s/%s"
%(settings['MONGODB_DB'], settings['MONGODB_COLLECTION']),
level=log.DEBUG, spider=spider)
Is this ok? Are there any rules in Python when it comes to breaking up
long lines of
code?
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
n00b question on spacing "Yves S. Garret" <yoursurrogategod@gmail.com> - 2013-06-21 17:17 -0400 Re: n00b question on spacing John Gordon <gordon@panix.com> - 2013-06-21 21:47 +0000
csiph-web