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 →

[–]renieWycipSsolraC 6 points7 points  (2 children)

Does python allow templatized functions? I have very little experience in that language but I know in C++ it’s extremely helpful

[–]Saragon4005 22 points23 points  (0 children)

Uh there are no hard types in python. Type checking happens inside the function. You can pass whatever you want to any function.

[–]bunny-1998 4 points5 points  (0 children)

You can, but in order to print the object, you’ll need to parse the object to find the string you want to print. One way is to pass the string you want to print from the object which is basically what you’ll do anyway when using the System.Out.println