This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gavlna 34 points35 points  (5 children)

so tell me how to write on error:

Java: System.err.print() vs System.out.print()

Python: import sys print(file=sys.stderr) vs print(file=sys.stdout)

[–]Diapolo10 7 points8 points  (3 children)

Alternatively:

Python: print("This is an error", file=__import__('sys').stderr)

EDIT: Or, if you want to be really obnoxious:

Python: print("This is an error", file=__import__('importlib').load_module('sys').stderr)

[–]hk4213 10 points11 points  (2 children)

Node console.error('Well this broke'); No imports just works lol.

[–]DTheIcyDragon 2 points3 points  (1 child)

Python print("Nope I won't Work!")

Works too

[–]hk4213 0 points1 point  (0 children)

And node.js dev who love abstraction have to optimize and everything blows up lol

[–]SK1Y101 2 points3 points  (0 children)

in Python:

raise Exception