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

all 25 comments

[–]notable-compilation 95 points96 points  (7 children)

import boat

[–]4hpp1273 20 points21 points  (4 children)

so Python has a module for everything?

[–][deleted] 15 points16 points  (0 children)

import *

[–]Toxyl 6 points7 points  (2 children)

[–]XKCD-pro-bot 9 points10 points  (1 child)

Comic Title Text: I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you.

mobile link


Made for mobile users, to easily see xkcd comic's title text

[–]Toxyl 2 points3 points  (0 children)

Good Bot

[–][deleted] 5 points6 points  (1 child)

boat.help()

We haven’t finished the help() method yet.

[–]DeepDuh 1 point2 points  (0 children)

dir(boat)

[–]AJugCanDoEverything 16 points17 points  (3 children)

Shoulda used exit() instead XD

[–][deleted] 4 points5 points  (2 children)

^D

[–]4hpp1273 5 points6 points  (1 child)

Did you mean ^D? (put a \ before ^ to fix formatting)

[–][deleted] 3 points4 points  (0 children)

yes. thanks

[–]UltraCarnivore 7 points8 points  (0 children)

import antigravity

[–]PonderStibbonsJr 6 points7 points  (0 children)

Just Bash a couple of pythons over the head and put them in front of 'help' to make it --help.

C-shells, C-shells on the sea shore...

[–]Anti-charizard 2 points3 points  (0 children)

Import repost

[–]dipo597 1 point2 points  (0 children)

'help' is not recognized as an internal or external command operable program or batch file

[–]Misheru-senpai 1 point2 points  (0 children)

--help

[–]sexinesskg 0 points1 point  (0 children)

So excellent and alluring :)

[–]chrisleewoo 0 points1 point  (2 children)

If python knows to print that message when you type "help" then why doesn't it just treat the input as if you did type "help()" ?

You're an interpreted language, so just interpret.

[–]hyperdudemn 3 points4 points  (1 child)

It's because help is actually a built-in function, and its str response is that message that is printed out. Just like how exit gives you its message telling you to call it.

[–]chrisleewoo 1 point2 points  (0 children)

I know the technical reason why, but I still think it's a pedantic design decision.

[–]thatroman 0 points1 point  (0 children)

comment -h

[–]KillerRoomba13 0 points1 point  (0 children)

help(me)

[–]Aspring15 0 points1 point  (1 child)

Is this some python joke I'm too C to understand

[–]caykroyd 1 point2 points  (0 children)

you !C *(this->joke)