On Sunday, November 27, 2016 at 12:33:36 PM UTC+1, Edward K. Ream wrote:
>
> On Sun, Nov 27, 2016 at 5:21 AM, rengel <reinhard...@gmail.com 
> <javascript:>> wrote:
> ​
>
> v._bodyString = '\n'.join(v._import_lines) + '\n'
>>
>
> No. It inserts a newline when v._import_lines is [].
>
> EKR
>

Well, this is a little longer, but still eliminates the comprehension and 
possibly hundreds of string additions.
 
v._bodyString = ('\n'.join(v._import_lines) + '\n') if v._import_lines else 
''


Reinhard



Enter code here...

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to