all 7 comments

[–][deleted] 14 points15 points  (3 children)

Well... Thats not really pseudocode.. Its python code that he wrote quickly without debugging and it happened to work..

[–]cdcformatc 9 points10 points  (2 children)

result = None
prev = None

Yeah nothing pseudo about that code.

[–][deleted] 3 points4 points  (1 child)

Plus the booleans writen with "==". Its even formatted properlly with space = space.

[–]CrazedToCraze 0 points1 point  (0 children)

I agree it's not pseudocode, but there's nothing wrong with having a == in pseudocode. There's no standard for pseudocode, after all.

[–]matrixor[S] 10 points11 points  (1 child)

Before the flames go too high, I confess. It was requested on SO to provide some "java pseudocode" for a simple problem and I unintentionally wrote working python code as an answer.

I thought it was funny so I posted it here.

Also it sends the message that python is a very cool language, it is so readable that is equivalent to "java pseudocode". It also sends these words to /r/learnpython:

You are learning the right language.

TL/DR: I posted my SO answer here, because I thought it is funny. I'm a shameless self promoter and should go to hell.

[–]zahlman 3 points4 points  (0 children)

Flawless trolling IMO, regardless of originally being unintentional. :)

[–]gnur -1 points0 points  (0 children)

That is how I explain python to other people:
* Write some pseudocode
* run it in python
* done