Teaching Georgian to Python

Are you familiar with computer programming? Do you know Python?? Have you ever wanted to write Python with Georgian keywords??? Yeah?! Well watch and be amazed.

I assume you have a recent version of Python (3.4+) and pip installed. First, run

$ pip3 install experimental

Then:

$ python3 -m experimental

experimental console version 0.9.7. [Python version: 3.6.5]

~~> georgian_keywords = {'თუ': 'if', 'სხვა': 'else'}

~~> from experimental.transformers.utils.one2one import translate

~~> class GeorgianSyntax:
...     def transform_source(self, source):
...         return translate(source, georgian_keywords)
...

~~> import experimental

~~> experimental.transforms.transformers['georgian_syntax'] = GeorgianSyntax()

~~> from __experimental__ import georgian_syntax

~~> for რიცხვი in range(5):
...     თუ რიცხვი % 2 == 0:          # if
...         print(რიცხვი, 'ლუწი')
...     სხვა:                        # else
...         print(რიცხვი, 'კენტი')
...
0 ლუწი
1 კენტი
2 ლუწი
3 კენტი
4 ლუწი

Wow! Somebody who actually knows Georgian would be able to Georgianize even more of the keywords. If anyone wants to give it a shot, let me know how it goes.

Advertisements