Live data from Hacker News

Python’s Preprocessor

pydong.org

41–50 of 109 posts

Re: Python’s Preprocessor

#43

Earlier quoted context omitted.

Let's not forget this fine contribution to the Python's nest. https://github.com/ajalt/fuckitpy

> https://github.com/ajalt/fuckitpy 10 years ago this was just a joke, but today, now that we're finally agile enough so that any disorganized jumble of completely unreviewed and unversioned notebooks might suddenly become a production pipeline? Why let a little thing like critical errors halt the execution of that perfect nightmare you've been working on! The only problem is that the database still won't let you sho…

I'm sure this tiny inconvenience can be taken care of with the help ofhttps://github.com/ostafen/viperdb or, if we want to stick to the juvenile innuendo, https://pythonhosted.org/pickleDB/

Re: Python’s Preprocessor

#44
Are the dependencies introduced via this coding hook strategy picked up by `pip freeze' or uv?

Otherwise, ..have fun with that :). Probably easier to rewrite any library rather than fight such dragons (because if someone put this in, what other traps await? Seems almost guaranteed.)

Re: Python’s Preprocessor

#45

I thought getting cute with import-hooks was probably the most creative possible way to get fired, but I see now that this was naive. My only regret is that the codec regex probably prevents using stuff like "μtf8" to really troll people properly, so now I'm going to have to use import hooks, preprocessors, and sys.settrace to monkey-patch every function to the previously called one, while swapping stdout and stderr…

Make sure you enforce use of curly braces like all good languages

Re: Python’s Preprocessor

#47
post #5

Earlier quoted context omitted.

As a community we really couldn't come up with a better name, eh?

PrePy could have worked... I guess lol maybe it was taken, cause Pydong... yeah.

I had actually considered PrePy and variations thereof for the magic_codec project (which is the example implementation showcased in that post), unfortunately all of these had been used by other projects before. Pydong is the name of the blog :)

Re: Python’s Preprocessor

#49
post #14

>>> from __future__ import braces File " ", line 1 SyntaxError: not a chance For those interested in how this (hilarious) error text came to be, it's been hardcoded in cpython since 2001! https://github.com/python/cpython/commit/ad3d3f2f3f19833f59f... The author, Jeremy Hylton, is now a Principal Engineer at Google working on AI search quality. It's quite remarkable that in 24 years, a single person's career has gone…

Innocent times. Perhaps Hylton could join the "vote of no confidence" motion in order to get justice for Tim Peters:

https://news.ycombinator.com/item?id=41314393

Re: Python’s Preprocessor

#50
post #26
post #5

Earlier quoted context omitted.

As a community we really couldn't come up with a better name, eh?

Not a prude but this name just reeks of immaturity.

To me it was always just a silly way of pronouncing "Python", especially in reference to terrible shenanigans like the ones the post talks about :P
Post reply on HN