While dynamic programming and duck typing often make it a bad idea to do so, it's sometimes useful to do different things based on the type of a given variable. For example, if the type of a variable is a URL, fetch that URL, otherwise, open it as a file. There are usually better ways of doing things, but this is often the most direct way.
Comments
No comments yet. Leave a Comment

