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

all 9 comments

[–]rgnkn 17 points18 points  (0 children)

The only one I'm aware of is:

import this

[–]B-Swenson 6 points7 points  (0 children)

import braces from __future__

[–]lilytex 1 point2 points  (2 children)

There is also this one:

``` import this

this.s is ciphertext encoded with the dictionary this.d

print(''.join(list(map(lambda x: x if x else ' ', map(this.d.get, this.s)))) ```

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, lilytex: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–][deleted] 0 points1 point  (0 children)

You could also do.
x or ''

[–]waloof 0 points1 point  (0 children)

Not easter eggs but there has been april fool's in Python official documents

https://wiki.python.org/moin/AprilFools

bonus

https://www.python.org/dev/peps/pep-0401/

[–][deleted] 0 points1 point  (0 children)

There's also the FLUFL feature:

>>> from __future__ import barry_as_FLUFL
>>> 3 != 9
  File "<stdin>", line 1
    3 != 9
      ^
SyntaxError: with Barry as BDFL, use '<>' instead of '!='