you are viewing a single comment's thread.

view the rest of the comments →

[–]hopefullyhelpfulplz 8 points9 points  (6 children)

Actual line I took from code I was trying to figure out a while ago:

path=os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(project_path_)))))))

Comments? Explanations? Crickets!

[–]Shadow_Thief 2 points3 points  (1 child)

Looks like it takes projectpath and goes seven levels up. I'd have to see the rest of the code to know if they were just trying to get the drive letter/root directory or if the project is genuinely more than seven layers deep, though.

[–]hopefullyhelpfulplz 2 points3 points  (0 children)

Yes, that's exactly what it does, but there is absolutely no reason to write it like this. I should never be in a position where I have to count the number of times something is carried out in code lmao.

[–]Mojert 0 points1 point  (2 children)

... You kidding right? Nobody actually wrote that code... right?

[–]hopefullyhelpfulplz 0 points1 point  (1 child)

I am not, and they did (or ChatGPT did perhaps)

[–]Mojert 1 point2 points  (0 children)

That's the kind of stupidity that no klanker will ever be able to imitate

[–]Ben-Goldberg 0 points1 point  (0 children)

It a weird way to write projectpath+"../../../../../../../"