473,563 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Proof that \ is a better line joiner than parenthetical sets

Goofy post of the day...

According to the Zen of Python, "explicit is better than implicit", and the
section in the Reference Manual describing the \ line joiner is called
"Explicit line joining" and the section describing parentheticals is called
"Implicit line joining."

So there! ;)
Jun 27 '08 #1
4 1175
John Salerno wrote:
According to the Zen of Python, "explicit is better than implicit", and
the section in the Reference Manual describing the \ line joiner is called
"Explicit line joining" and the section describing parentheticals is
called "Implicit line joining."

So there! ;)
However, according to the Zen of Python, the line before

"Explicit is better than implicit."

says:

"Beautiful is better than ugly."

And I think putting parenthesis around a multi-line statement is much
prettier.

So there! :)

j
Jun 27 '08 #2
One or more spaces behind a \ used for joining a multi-line statement
can already generate a SyntaxError exception.

2:1 for paranthesis
Jun 27 '08 #3
"Joshua Kugler" <jk*****@bigfoo t.comwrote in message
news:ma******** *************** **************@ python.org...
However, according to the Zen of Python, the line before

"Explicit is better than implicit."

says:

"Beautiful is better than ugly."

And I think putting parenthesis around a multi-line statement is much
prettier.

So there! :)
Oh, I just got owned! It seems there's a zen to the Zen, as well!

And for what it's worth, I actually like the parentheses better anyway. :)
Jun 27 '08 #4
Joshua Kugler wrote:
"Beautiful is better than ugly."
And I think putting parenthesis around a multi-line statement is much
prettier.

So there! :)

j
And PEP 8 agrees with you. Another vote for parens.

-Jordan
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
1595
by: Russell Wallace | last post by:
Hi all, Python lets you continue a single logical line across more than one physical line, either by putting a \ at the end or letting it happen automatically with an incomplete infix operator. I'm wondering how often is this feature needed? Would there be any problems if it weren't part of the language? --
19
33077
by: Philipp Lenssen | last post by:
I don't know the English word, but I'm referring to the double-dash which is used to separate parts of a sentence. I'm using — so far. Now I saw – which is slightly shorter. Some sites use --. Is there anything I should know to make a good decision on which to use, other than what looks best? I think the W3C validator is always handing out...
34
2388
by: Justin Timberlake | last post by:
I was thinking about all those /Indian Outsourcing/ companies getting those .Net shops set up. 0. Nobody uses .NET in the real world, it's all java. 1. MSFT is about to collapse as witnessed by Bill Gate$ selling his stock in droves. 2. Linux marketshare is eating up windos. So when all is said and done, the wogs won't have much left for...
43
3379
by: Rob R. Ainscough | last post by:
I realize I'm learning web development and there is a STEEP learning curve, but so far I've had to learn: HTML XML JavaScript ASP.NET using VB.NET ..NET Framework ADO.NET SSL
17
1392
by: Edwin Knoppert | last post by:
I know ASP.NET 1.x generated dll's which decompilable to plain c or vb (afaik, i never used 2003) Is this problem solved in 2005? We ever want to distribute 2005 compiled code. And it seems all like ordinary dll's at first. Is the code i wrote retrievable? Thanks!
8
10010
by: tintagel | last post by:
Hi everyone, I've just joined your group! I'm pretty new to HTML etc. Here's my problem: I'm attached to the idea of keeping content separate from formatting information, so I like putting content in a .xml document and then making a stylesheet for it. At the moment I'm working on a lot of prose-style text, and having to enclose...
23
2357
by: JoeC | last post by:
I am a self taught programmer and I have figured out most syntax but desigining my programs is a challenge. I realize that there are many ways to design a program but what are some good rules to follow for creating a program? I am writing a map game program. I created several objects: board object that is an array of integers each number...
0
996
by: Eduardo Luiz | last post by:
Hi, im brazilian.. Sorry my english.. I need a component to manager sounds.. Split, Joiner... i have one sound.. and i need insert a other sound (ads) in a second or frame position.. Ex: Original sound: 1 min.
2
13761
by: gypsy3001 | last post by:
Today, I was trying to construct a regular express in JavaScript. But I kept getting the "Error: unterminated parenthetical" message. I want to do something like this: keyCombo = ":("; pattern = new RegExp (keyCombo); str = string.replace (pattern, "frown"); So, first thing I fixed is ":\(" . . . But I still get the same error!
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.