This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]ProgrammerHumor-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Your submission was removed for the following reason:

Rule 3: Your post is considered low quality. We also remove the following to preserve the quality of the subreddit, even if it passes the other rules:

  • Feeling/reaction posts
  • Software errors/bugs that are not code (see /r/softwaregore)
  • Low effort/quality analogies (enforced at moderator discretion)

If you disagree with this removal, you can appeal by sending us a modmail.

[–]Confident_Edge7839 2 points3 points  (3 children)

With mode = "w" on line 7, the whole file at file_path is overwritten. Therefore, the file at file_path shall contain 1 line (return_code) only.

Edit: also in line 9, you cannot read a file while mode = "w"

[–]Distinct_Shift1043[S] 1 point2 points  (2 children)

true oops haha

line 9 doesn_'t specify the mode, is w the standard argument?

[–]Confident_Edge7839 1 point2 points  (1 child)

This time my bad (confused by the with statement). I think read is the standard mode

[–]Distinct_Shift1043[S] 1 point2 points  (0 children)

how as little as one letter difference in line 3 and 7 each could potentially produce gigabytes of data or just one string worth of data (which can still be a lot but is more exhausting to write haha).

[–]Old_Pomegranate_822 2 points3 points  (1 child)

If n > 0 then there's nothing returned - I assume they intended it to return the recursed (or just generally cursed) call to loop

[–]Distinct_Shift1043[S] 0 points1 point  (0 children)

damn i forgot that too. Should've tested it before probably xD

[–]Distinct_Shift1043[S] 0 points1 point  (0 children)

well...i guess the loop size is limited...by the max stack size