looking at some python code and going "ugh, this was written by a java programmer"
YOU DON'T NEED THIS MANY CLASSES, MAN!
I can't just call foobar.someformat.SomeFormat.read('data.file'), I gotta instantiate a BinaryReader and use it to make a SomeFormatReader
θΔ ⋐ & ∞
@foone you if you saw the original dr blockhead and the impossible course source code probably (its layout was inspired by minecraft so it has a class and in the if __name__ == "__main__" part it does Game().run() like in java (well it has a try/catch for doing an error dialogue))
well i mean in that source code there are worse examples of bad code due to the time constraint but that is one of them
oh god, SomeFormat is an abstract base class, and I need to use a different class for it to work
@foone You post some weird stuff every day. But that is definitely a weird API design choice, even for something you posted about.
@wrosecrans @foone
Especially since `open(filename, "b")` is how you're supposed to spell "BinaryReader" in python.
the worst thing is that I don't know if this code even works. am I using it wrong? or is it written wrong?
python programmer pro-tip:
if your packages/modules/namespace system is so complicated that you need to dynamically generate python files containing import lines to handle it, YOUR SYSTEM IS TOO COMPLICATED
bad times is when you see some JSON code with encoding="shift-jis"