Python Forum
common form of multi-line text
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
common form of multi-line text
#1
for a function intended to take a multi-line block of text and produce a different multi-line block of text as the return value (not necessarily the same number of lines), should it expect a string with '\n' or '\r' or '\r\n' ending each line or should it expect a list or tuple of strings with no control ending?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
That depends on the rest of the program.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
it's for a function that could be used in many programs. for example i have a function called box() that forms an ASCII box around the text given to it. maybe i should make it return text in the same form given to it,
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
(Nov-28-2019, 03:34 PM)Skaperen Wrote: the text given to it

I think that's your answer right there.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb traceback and multi-line statement Skaperen 0 810 Jan-31-2023, 12:23 AM
Last Post: Skaperen
  a form of coded logic in a comand line Skaperen 10 2,786 Mar-02-2022, 08:43 PM
Last Post: Skaperen
  common element in some lists Skaperen 4 2,379 May-23-2021, 10:57 PM
Last Post: Skaperen
  How to create a New line in a Text block in Blender software using Python 3.7? starzar 0 4,650 Jun-08-2019, 08:27 AM
Last Post: starzar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020