Alex Rembish
Slightly Retarded Senior Python Zombie Evangelist
AR,
Pražské Pyvo
Nov, 2018
Alex Rembish. Siberian. Traveller. Team leader.
DevOps supporter. Python exterminator.
1st Grade Math
Lightning Talk
1st Grade Math
Lightning Talk
#! /usr/bin/env python2
prádelna = 2
á = 1
print(prádelna - á) # = ?
prádelna = 2
^
SyntaxError: invalid syntax
Next code will not work as well:
# coding=utf8
import sys
reload(sys)
sys.setdefaultencoding("utf8")
#! /usr/bin/env python3
A = 1
A = 2
print(A - A) # = ?
#! /usr/bin/env python3
A = 1
A = 2
print(A - A) # = 0
#! /usr/bin/env python3
Α = 1
A = 2
print(Α - A) # = ?
#! /usr/bin/env python3
Α = 1 # GREEK CAPITAL LETTER ALPHA
A = 2 # LATIN CAPITAL LETTER A
print(Α - A) # = -1
#! /usr/bin/env python3
A = 1
A = 2
print(A - A) # = ?
#! /usr/bin/env python3
A = 1 # FULLWIDTH LATIN CAPITAL LETTER A
A = 2 # LATIN CAPITAL LETTER A
print(A - A) # = 0
#! /usr/bin/env python3
AAAA = 1
AAAA = 2
print(globals())
# => {..., 'AAAA': 2}
#! /usr/bin/env python3
print(not(True)) # = ?
#! /usr/bin/env python3
print(not(True)) # = False
def nοt(x):
return x
print(nοt(True)) # = ?
#! /usr/bin/env python3
print(not(True)) # = False
def nοt(x):
return x
print(nοt(True)) # = True
#! /usr/bin/env python3
print(not(True)) # = False
def nοt(x): # Greek Capital Letter Omicron
return x
print(nοt(True)) # = True
def not(x):
^
SyntaxError: invalid syntax
#! /usr/bin/env python3
🐮 = 1
🍖 = 2
print(🐮 - 🍖) # = ?
#! /usr/bin/env python3
🐮 = 1
🍖 = 2
print(🐮 - 🍖)
🐮 = 1
^
SyntaxError: invalid character in identifier
$ pip install emoji-encoding
# filename: emoji.py
#! /usr/bin/env python
# coding: emoji
🐮 = 1
🍖 = 2
print(🐮 - 🍖)
from emojiencoding import bootstrap
import emoji # = -1
#! /usr/bin/env python3
from math import pi, sin
π = pi
α = π / 2.
print(sin(α)) # = 1.0
But
Send me a tweet:
Join my team:
By Alex Rembish