Skip to content

Comment on An Interview with Yukihiro “Matz” Matsumotoparent

Comments

http://www.chinesepython.org/english/english.html

A simple Python program:

  import sys
  filenames = sys.argv[1:]
  
  def fixline(filename):
       text = open(filename).read()
       text = text.replace('\n\r','\n')
       return text

  for file in filenames:
       print fixline(file)

and its translation:
  載入 系統
  文件名 = 系統.參數[1:]

  定義 修正行尾(文件):
       內文 = 打開(文件名).讀入()
       內文 = 內文.替換('\n\r','\n')
       傳回 內文

  取 文件 自 文件名:
       寫 修正行尾(文件)

Well, I ever! Didn't even realise something like this is even possible! :O

Is it the same for Cyrillic or German or Spanish for that matter?

Blown. Away.

This is of course interesting. I have thought about this before: But wouldn't it be more interesting to use (say the orient) language's mindset to set, embedded into the language at its core?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.