Learning a lot about Python from Holly Glaceon :monorail_boop:

@vaporeon_ a very large brain which contains many fun python facts, im sure

@wallhackio @vaporeon_ a lot of useful ones and a whole bunch of useless ones from my years golfing lmao

Follow

@monorail @vaporeon_ i am useless/esoteric fact enjoyer so feel free to share horrendous evil python knowledge with me please 🥺

@wallhackio @monorail Same, Vaporeon is very eager to learn useless Python facts, too, and not just the useful ones

@wallhackio @vaporeon_ did you know that in python2, spaces and tabs can coexist? and they're considered two different indentation depths? this can save bytes if you need to nest things deeply while golfing, every line that would start with two spaces can instead start with a tab

@monorail @wallhackio Time to re-install Python2 on my computer specifically to test this

@monorail @wallhackio Oh, wait, maybe I should just use the old computer instead, assuming that it has Python2 and not Python1

@monorail @wallhackio The old computer (running Gentoo from 2007) does have Python2 already, it has version 2.4.3

An even older computer that I've set up only has Python1, that's why I was unsure

@monorail @wallhackio But what do you mean with "spaces and tabs can coexist"? If you mean something like in the attached screenshot (^I is a tab, whitespaces are whitespaces, $ is end of line, this is Vim's listing mode), then this also works in Python3

@monorail @wallhackio Yeah, that's cursed :blobcatsurprised:

And it works in Python2 and not in Python3!

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.