Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting a file in memory
#1
you are creating a script using a new module. it has just one function. the documentation is very short and simple and says that the return value of the function is "a text file". what do you expect to get?
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
this looks like poor documentation (ambiguous), so I will just look at the source code or test what the return value is. And probably would raise issue or (if possible) fix the docs and make a pull request
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Also consider looking at the test suite for the library. Tests are executable documentation! Writing learning tests may also be useful.
Reply
#4
help() could help.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#5
i'm trying to determine which would be more pythonic for text, a single big string with embedded newlines, or a list of strings with no newlines and each line in a list item. functions that operate on these can check what they get but functions that create text need to be specific.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

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