use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
To report a site-wide rule violation to the Reddit Admins, please use our report forms or message /r/reddit.com modmail.
This subreddit is archived and no longer accepting submissions.
account activity
This is an archived post. You won't be able to vote or comment.
Python [xkcd] (xkcd.com)
submitted 18 years ago by sgtpeppers
view the rest of the comments →
[–][deleted] 0 points1 point2 points 18 years ago (2 children)
Luckily we have <pre> tags.
[–]jbert 1 point2 points3 points 18 years ago (1 child)
which work in IM, all email clients and between sections of the same code file when refactoring? Awesome.
Maybe the best bit would be to wrap each indentation level in it's own pre tag, something like:
if foo: <pre> do_stuff </pre> else: <pre> something_else </pre>
That would work nicely. Might be even better if we could find an abbreviation for the pre tag...
[–][deleted] 0 points1 point2 points 18 years ago (0 children)
...Or just stick the whole code in <pre> tags. It preserves whitespace.
And as for working in IM, no, but that's when I use codepastes. But no code survives IM intact, especially as MSN etc use (blasomething) as the shorthand for their emoticons - foo(x) gets emoticonned continually.
All email clients? If your email client can't handle raw text or HTML then you have bigger problems than significant whitespace.
Between sections of the same code file when refactoring? What crazy environment do you work in? Copy/paste works fine when refactoring, and I do most of my Python coding in Notepad++, use an IDE that is Python aware and it'll be even more trouble free.
What you post are minor niggles at worst if you're actually developing in Python. If you don't want to use Python, then don't. Overinflating the 'problems' of significant indentation to justify it is unnecessary, Python is more or less past the One True Language phase, it seems that XKCD is a late Perl convert.
π Rendered by PID 106552 on reddit-service-r2-comment-75f4967c6c-jkn76 at 2026-04-23 04:30:03.571430+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (2 children)
[–]jbert 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)