Hacker News new | ask | show | jobs
by oplaadpunt 1084 days ago
Yeah, the difference between manipulating the syntax being the intendend way, and it being possible only through hacking and dark magic is rather stark. It's fun to know that it is basically possible to do though, and I didn't know python had these obscure parts (ast manipulation and codecs)
1 comments

Whether manipulating the syntax is encouraged or only possible through black magic, the basic problem which GP was (I think) referring to stays the same: "modified" syntax may look more elegant to whoever wrote it, but probably makes the code harder to read and understand for whoever has to work with it later (and that may be yourself, a few years down the line). Plus of course this makes it easier for bugs to hide in unexpected places...