Skip to content

carlbordum/halp-encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

halp-encoding

Did you know that Python has a quite awesome help utility that works for all kinds of stuff like keywords and modules? You can enter the interactive help utility by simply typing help() in a prompt.

A beginnner asked on chat.freenode.nets lovely channel ##learnpython, why his command, help(lambda), did not work. This is because lambda is a keyword that cannot be used like this, so the interpreter throws a SyntaxError back. For fun I decided to write a codec where this is possible, only for the help function (or rather, only for any callable you decide to name help :D)

halp.py adds the halp codec when loaded so you can # coding=halp. This allows lines like:

help(if)
help(except)

The best way to see it in action is to read example.py, fire up an interpreter and do:

>>> import halp
>>> import example

About

Makes `help(except)` valid Python syntax (works for all keywords)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages