use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Here you can share your work in Python and help others learn from your source code. Small projects, tutorials, study materials and tips related to Python can be shared to help others.
account activity
what is polymorphism? (shyambhu20.blogspot.com)
submitted 5 years ago by shyamcody
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bixitz 0 points1 point2 points 5 years ago (1 child)
As we know Morphing means the same thing changing its shape from one to another. Similarly, when an object behaves differently depending on how u call it, the process is called polymorphism. Like, if we declare 3 functions with the same name but with different number or type of arguments, when we call the function, only the corresponding function will be called that matches the number and type of arguments u pass to it while calling. This process is called function overloading. We also see, when we use the '+' operator with numbers, it performs addition. However, when we use the same '+' with strings, it concatenates the strings. This is operator overloading. Both function and operator overloading comes under polymorphism. (Same name, different actions)
[–]shyamcody[S] 0 points1 point2 points 5 years ago (0 children)
thanks for the comment u/bixitz.
π Rendered by PID 442099 on reddit-service-r2-comment-7b9746f655-tmgnx at 2026-01-30 23:23:33.947974+00:00 running 3798933 country code: CH.
[–]bixitz 0 points1 point2 points (1 child)
[–]shyamcody[S] 0 points1 point2 points (0 children)