Re: Python strings and coding conventions

2009-01-11 Thread Marc 'BlackJack' Rintsch
On Sat, 10 Jan 2009 20:48:21 -0800, Mensanator wrote: Damn! I didn't know you could do that! And if I saw it in a program listing, such would never occur to me. I was going to suggest the stupid way: ga = ['four score and seven years ago ', \ 'our fathers brought forth ', \

Re: Python strings and coding conventions

2009-01-11 Thread Ben Finney
Robert Kern robert.k...@gmail.com writes: I usually use implicit concatenation: s = ('some long text that ' 'needs to be split') I do something very similar: fleebnorg.spam = ( 'some long text that' ' needs to be split') The differences are: I prefer to have

Re: Python strings and coding conventions

2009-01-11 Thread Steve Holden
Mensanator wrote: On Jan 10, 10:26�pm, Robert Kern robert.k...@gmail.com wrote: koranth...@gmail.com wrote: Hi, � �Python Coding Convention (PEP 8) suggests : � Maximum Line Length � � Limit all lines to a maximum of 79 characters. � I have a string which is ~110 char long. It is a string

Re: Python strings and coding conventions

2009-01-11 Thread MRAB
koranth...@gmail.com wrote: On Jan 11, 9:26 am, Robert Kern robert.k...@gmail.com wrote: koranth...@gmail.com wrote: Hi, Python Coding Convention (PEP 8) suggests : Maximum Line Length Limit all lines to a maximum of 79 characters. I have a string which is ~110 char long. It is a

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 3:56�am, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: On Sat, 10 Jan 2009 20:48:21 -0800, Mensanator wrote: Damn! I didn't know you could do that! And if I saw it in a program listing, such would never occur to me. I was going to suggest the stupid way: ga = ['four score and

Re: Python strings and coding conventions

2009-01-11 Thread Roy Smith
In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, Mensanator mensana...@aol.com wrote: What are all those line continuation characters ('\') for? ?You are aware that they are unnecessary here? Actually, I wasn't aware of that. A quick review shows why. In the

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 12:12�pm, Roy Smith r...@panix.com wrote: In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, �Mensanator mensana...@aol.com wrote: What are all those line continuation characters ('\') for? ?You are aware that they are unnecessary here? Actually,

Re: Python strings and coding conventions

2009-01-11 Thread John Machin
On Jan 12, 5:34 am, Mensanator mensana...@aol.com wrote: On Jan 11, 12:12 pm, Roy Smith r...@panix.com wrote: In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, Mensanator mensana...@aol.com wrote: What are all those line continuation characters ('\')

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 2:37�pm, John Machin sjmac...@lexicon.net wrote: On Jan 12, 5:34�am, Mensanator mensana...@aol.com wrote: On Jan 11, 12:12 pm, Roy Smith r...@panix.com wrote: In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, Mensanator mensana...@aol.com

Re: Python strings and coding conventions

2009-01-11 Thread John Machin
On Jan 12, 8:23 am, Mensanator mensana...@aol.com wrote: On Jan 11, 2:37 pm, John Machin sjmac...@lexicon.net wrote: On Jan 12, 5:34 am, Mensanator mensana...@aol.com wrote: On Jan 11, 12:12 pm, Roy Smith r...@panix.com wrote: In article

Python strings and coding conventions

2009-01-10 Thread koranthala
Hi, Python Coding Convention (PEP 8) suggests : Maximum Line Length Limit all lines to a maximum of 79 characters. I have a string which is ~110 char long. It is a string which I am going to print in a text file as a single string. i.e. in that text file, each line is taken as a

Re: Python strings and coding conventions

2009-01-10 Thread Robert Kern
koranth...@gmail.com wrote: Hi, Python Coding Convention (PEP 8) suggests : Maximum Line Length Limit all lines to a maximum of 79 characters. I have a string which is ~110 char long. It is a string which I am going to print in a text file as a single string. i.e. in that text

Re: Python strings and coding conventions

2009-01-10 Thread Mensanator
On Jan 10, 10:26�pm, Robert Kern robert.k...@gmail.com wrote: koranth...@gmail.com wrote: Hi, � �Python Coding Convention (PEP 8) suggests : � Maximum Line Length � � Limit all lines to a maximum of 79 characters. � I have a string which is ~110 char long. It is a string which I am

Re: Python strings and coding conventions

2009-01-10 Thread koranthala
On Jan 11, 9:26 am, Robert Kern robert.k...@gmail.com wrote: koranth...@gmail.com wrote: Hi,    Python Coding Convention (PEP 8) suggests :   Maximum Line Length     Limit all lines to a maximum of 79 characters.   I have a string which is ~110 char long. It is a string which I am