mattaereal/hieroglyphy.py — pull request #2 by kernelsmith (2012-08-23 18:04:36+00:00)
Title: I believe there is a bug in hieroglyphyNumber or in __main__ depending on your point of view

$ python hieroglyphy.py number 5

[*] Encoded number below: 5
+((!+[]+!![]+!![]+!![]+!![]+[]))

But it should return !+[]+!![]+!![]+!![]+!![] according to
http://patriciopalladino.com/files/hieroglyphy/ (and my ruby version
does the same)

the number 5 was being treated as "5". This can be fixed either by
changing __main__ to print hy.hieroglyphyNumber(int(sys.argv[2]))
or by changing hieroglyphyNumber to include:
n = int(n)
which is what this commit does. This prevents other calling code from
having the same problem, however it means that calling code must ensure
it calls hieroglyphyString when "glyph"ing "5", not hieroglyphyNumber