KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Let's say I have a class that has a member called data which is a list. I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list. What's your technique for doing this? Do you just check the type by looking at __class__ ? Is there some trick I might be missing? I'm used to C++ where overloading by argument type is easy.
Tags (comma-separated)
Save Edits
Cancel