Re:Altering Python attribute handling for modules
by fluidcruft on Monday September 11, 2023 @11:04AM
(#37468353)
Franky, it's because python is only barely tolerable vs actual array-centered languages like Fortran or Matlab or Julia. It's bad enough having to sprinkle "np." and extra parentheses of various flavors and dangling commas everywhere along with whitespace eating up columns. The comparison should be with Matlab or Julia. Most people writing numpy-based code are trying to replace Matlab and Fortran.
Maybe you could be pedantically happy if "numpy" itself were renamed "np"? Then we can just "import np" and spare you from a DSL nightmare and ourselves from a few keystrokes while you can move on to complaining about obtuse, ungoogleable and inscrutable package names instead.
Re:Altering Python attribute handling for modules
by wiredfool on Monday September 11, 2023 @11:45AM
(#37468998)
No, that's not it, that's just a thing that happens.
I'm thinking more of a community that can't decide between
from foo import toolkit
from foo import toolkit as tk
from foo.toolkit import thing1, thing2
from not.foo_toolkit import internalThing1, internalThing2
and the pain it is to deal with reading code there.
It's something of a lost cause in the numpy/pandas ecosystem though, since every single example has them renamed this way and it induces just the cognitive load that I'm trying to avoid.