Skip to content

Commit

Permalink
Python 10 was a success, commemorate it\!
Browse files Browse the repository at this point in the history
  • Loading branch information
freddrake committed Feb 8, 2002
1 parent 65f5015 commit 63cd9bf
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Lib/this.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
s = """Gur Mra bs Clguba, ol Gvz Crgref
Ornhgvshy vf orggre guna htyl.
Rkcyvpvg vf orggre guna vzcyvpvg.
Fvzcyr vf orggre guna pbzcyrk.
Pbzcyrk vf orggre guna pbzcyvpngrq.
Syng vf orggre guna arfgrq.
Fcnefr vf orggre guna qrafr.
Ernqnovyvgl pbhagf.
Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf.
Nygubhtu cenpgvpnyvgl orngf chevgl.
Reebef fubhyq arire cnff fvyragyl.
Hayrff rkcyvpvgyl fvyraprq.
Va gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.
Gurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.
Nygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh'er Qhgpu.
Abj vf orggre guna arire.
Nygubhtu arire vf bsgra orggre guna *evtug* abj.
Vs gur vzcyrzragngvba vf uneq gb rkcynva, vg'f n onq vqrn.
Vs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.
Anzrfcnprf ner bar ubaxvat terng vqrn -- yrg'f qb zber bs gubfr!"""

d = {}
for c in (65, 97):
for i in range(26):
d[chr(i+c)] = chr((i+13) % 26 + c)

print "".join([d.get(c, c) for c in s])

5 comments on commit 63cd9bf

@lzjun567
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple is better then complex ???

@kingbuzzman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the point of this being rot13? This has to be a joke!

>>> timeit.timeit('str.maketrans("ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz","NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm")')
2.506972790986765
>>> this_code = """
... d = {}
... for c in (65, 97):
...     for i in range(26):
...         d[chr(i+c)] = chr((i+13) % 26 + c)
... """
>>> timeit.timeit(this_code)
18.706230953976046

A slow joke.

@wadewilliams
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is either one of the best executed troll maneuvers of our time, OR, an intentional way to avoid anything from this file showing up in a search of the codebase πŸ€” :trollface:

@jessiejs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@Tom-game-project
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple is better then complex ???

I also think so!

Please sign in to comment.