Comments

Hacker News

This should be part of the Standard Library if so efficient.

by kelsolaar

Interesting to see the rust code is doing the actual parallelization, while execution. Will it work for complex loops, and what happens if the loops uses global context and different variables, outside of the loop?. May be it should go to python standard library.

by prabhanjana_c

I think I’m a little skeptical.

#pragma is a real keyword in C but # is just a comment in python - why not use a pythonic @decorator?

Vendoring a library like this into an app seems like a lot more toil than just writing the native multiprocessing python code, or using something built for number crunching like arrayfire or numpy

by peterabbitcook

This code seems to be fairly pervasively AI-written (both structurally/syntacticly, with many additional AI verbosity tells in the documentation, and going by the commit history).

That's a problem for me, given what this library does: arbitrary transformations of Python code at load time. The fragility, security risk, and complexity added by basically writing a subdialect of Python with new semantics is something I'd like to see more human attention on and maturity of before I consider using it. There are times when AI smell doesn't concern me much when deciding whether or not to use someone's code. This isn't one of those times.

by zbentley

Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • This should be part of the Standard Library if so efficient.
  • Interesting to see the rust code is doing the actual parallelization, while execution. Will it work for complex loops, and what happens if the loops uses global context and different variables, outside of the loop?. May be it should go to python standard library.
  • I think I’m a little skeptical.

    #pragma is a real keyword in C but # is just a comment in python - why not use a pythonic @decorator?

    Vendoring a library like this into an app seems like a lot more toil than just writing the native multiprocessing python code, or using something built for number crunching like arrayfire or numpy

  • This code seems to be fairly pervasively AI-written (both structurally/syntacticly, with many additional AI verbosity tells in the documentation, and going by the commit history).

    That's a problem for me, given what this library does: arbitrary transformations of Python code at load time. The fragility, security risk, and complexity added by basically writing a subdialect of Python with new semantics is something I'd like to see more human attention on and maturity of before I consider using it. There are times when AI smell doesn't concern me much when deciding whether or not to use someone's code. This isn't one of those times.

  • Not very Pythonic

      for i in range(len(records)):
        scores[i] = score(records[i])
    
    Better

      for i, record in enumerate(records):
        scores[i] = score(record)
    
    Best

      scores = [score(record) for record in records]
    
    Raymond Hettinger (Python core dev): https://gist.github.com/bespokoid/205efd91546ddb16b210678830...