top | item 37058743

(no title)

ignite | 2 years ago

Funny how things come around again and again.

Fortran had basically the same bug, fifty years ago. https://softwareengineering.stackexchange.com/a/254921

discuss

order

seanhunter|2 years ago

This isn't a bug, it's absolutely expected behaviour. The author has just dressed it up in a blog post to make something of it, but anyone who has written a python library will know that code that isn't in a function (including function default arguments) gets evaluated on import. You don't need a C-extension to do that part. Then he messes with some internals, which isn't surprising either since python's philosophy is very much "internals are available - caveat emptor but if you want to mess with them go nuts".